CVE-2022-50271: vhost/vsock: Use kvmalloc/kvfree for larger packets.
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50271?
CVE-2022-50271 is considered a medium severity vulnerability in the Linux kernel.
What impact does CVE-2022-50271 have on the system?
CVE-2022-50271 can lead to memory allocation failures when copying large files over sftp via vsock.
How do I fix CVE-2022-50271?
To fix CVE-2022-50271, you should update to the latest stable version of the Linux kernel where this vulnerability has been addressed.
Which versions of the Linux kernel are affected by CVE-2022-50271?
CVE-2022-50271 affects multiple versions of the Linux kernel before the fix was applied.
Is CVE-2022-50271 related to memory management in the Linux kernel?
Yes, CVE-2022-50271 is related to memory management, specifically the allocation of larger packet sizes in the kernel.