In the Linux kernel, the following vulnerability has been resolved:
vhost/vsock: Use kvmalloc/kvfree for larger packets.
When copying a large file over sftp over vsock, data size is usually 32kB, and kmalloc seems to fail to try to allocate 32 32kB regions.
vhost-5837: page allocation failure: order:4, mode:0x24040c0 Call Trace: [<ffffffffb6a0df64>] dumpstack+0x97/0xdb [<ffffffffb68d6aed>] warnallocfailed+0x10f/0x138 [<ffffffffb68d868a>] ? _allocpagesdirectcompact+0x38/0xc8 [<ffffffffb664619f>] _allocpagesnodemask+0x84c/0x90d [<ffffffffb6646e56>] allockmempages+0x17/0x19 [<ffffffffb6653a26>] kmallocordertrace+0x2b/0xdb [<ffffffffb66682f3>] _kmalloc+0x177/0x1f7 [<ffffffffb66e0d94>] ? copyfromiter+0x8d/0x31d [<ffffffffc0689ab7>] vhostvsockhandletxkick+0x1fa/0x301 [vhostvsock] [<ffffffffc06828d9>] vhostworker+0xf7/0x157 [vhost] [<ffffffffb683ddce>] kthread+0xfd/0x105 [<ffffffffc06827e2>] ? vhostdevsetowner+0x22e/0x22e [vhost] [<ffffffffb683dcd1>] ? flushkthreadworker+0xf3/0xf3 [<ffffffffb6eb332e>] retfromfork+0x4e/0x80 [<ffffffffb683dcd1>] ? flushkthreadworker+0xf3/0xf3
Work around by doing kvmalloc instead.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6d0152c95108651f1880c1ddfab47cb9e3e62d0",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-071e7a68",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d720c3f0a03e97867deab7e480ba3d3e19837ba",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-1289f544",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@36c9f340c60413e28f980c0224c4e9d35851526b",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-234251a0",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d720c3f0a03e97867deab7e480ba3d3e19837ba",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-2d97ff5e",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7aac8c63f604e6a6a46560c0f0188cd0332cf320",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-31b2c60c",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7aac8c63f604e6a6a46560c0f0188cd0332cf320",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-3b005ebd",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e6d0152c95108651f1880c1ddfab47cb9e3e62d0",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-50cebf36",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b4a5905fd2ef841cd61e969ea692c213c2e5c1f7",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-58fb260a",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a99fc6d818161d6f1ff3307de8bf5237f6cc34d8",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-6db50a34",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e28a4e7f0296824c61a81e7fd54ab48bad3e75ad",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-8c348abd",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@36c9f340c60413e28f980c0224c4e9d35851526b",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-977920c1",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b4a5905fd2ef841cd61e969ea692c213c2e5c1f7",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-b4e3c685",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0e3f72931fc47bb81686020cc643cde5d9cd0bb8",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-dccdf2e9",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0e3f72931fc47bb81686020cc643cde5d9cd0bb8",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-dfe703f4",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a99fc6d818161d6f1ff3307de8bf5237f6cc34d8",
"target": {
"file": "net/vmw_vsock/virtio_transport_common.c"
},
"digest": {
"line_hashes": [
"173975706842963389924970710741196082718",
"254219542369168281665476236271192793894",
"175709247747925330861031346474934197004",
"45661232003257206848189887055607456644"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-e1b45116",
"signature_type": "Line",
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e28a4e7f0296824c61a81e7fd54ab48bad3e75ad",
"target": {
"file": "drivers/vhost/vsock.c"
},
"digest": {
"line_hashes": [
"276150057061539514444291450187341917128",
"150498007836508517554521803360619567554",
"304740932942195526615434591936816542887",
"66145276498404297434995542159080637857"
],
"threshold": 0.9
},
"deprecated": false,
"id": "CVE-2022-50271-e3ad179d",
"signature_type": "Line",
"signature_version": "v1"
}
]