CVE-2021-4440
HighIn the Linux kernel, the following vulnerability has been resolved: x86/xen: Drop USERGS_SYSRET64 paravirt call commit afd30525a659ac0ae0904f0cb4a2ca75522c3123 upstream. USERGS_SYSRET64 is used to return from a syscall via SYSRET, but a Xen PV guest will nevertheless use the IRET hypercall, as there is no sysret PV hypercall defined. So instead of testing all the prerequisites for doing a sysret and then mangling the stack for Xen PV again for doing an iret just use the iret exit from the beginning. This can easily be done via an ALTERNATIVE like it is done for the sysenter compat case already. It should be noted that this drops the optimization in Xen for not restoring a few registers when returning to user mode, but it seems as if the saved instructions in the kernel more than compensate for this drop (a kernel build in a Xen PV guest was slightly faster with this patch applied). While at it remove the stale sysret32 remnants. [ pawan: Brad Spengler and Salvatore Bonaccorso <[email protected]> reported a problem with the 5.10 backport commit edc702b4a820 ("x86/entry_64: Add VERW just before userspace transition"). When CONFIG_PARAVIRT_XXL=y, CLEAR_CPU_BUFFERS is not executed in syscall_return_via_sysret path as USERGS_SYSRET64 is runtime patched to: .cpu_usergs_sysret64 = { 0x0f, 0x01, 0xf8, 0x48, 0x0f, 0x07 }, // swapgs; sysretq which is missing CLEAR_CPU_BUFFERS. It turns out dropping USERGS_SYSRET64 simplifies the code, allowing CLEAR_CPU_BUFFERS to be explicitly added to syscall_return_via_sysret path. Below is with CONFIG_PARAVIRT_XXL=y and this patch applied: syscall_return_via_sysret: ... <+342>: swapgs <+345>: xchg %ax,%ax <+347>: verw -0x1a2(%rip) <------ <+354>: sysretq ]
CVSS 3.1 score
8.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness type
CWE-400CVE-2021-4440 is a Uncontrolled Resource Consumption vulnerability
What is Uncontrolled Resource Consumption?
The product does not properly control the amount of resources it consumes, leading to exhaustion. Learn more on MITRE CWE
Affected versions
Linux kernel versions
5.10.215
and later are affected. Fixed in
5.10.218
and their respective stable series.
References
2 total-
Patch
-
Patch
Frequently asked questions
-
What is CVE-2021-4440?
CVE-2021-4440 is a High severity Linux kernel vulnerability with a CVSS score of 8.8 out of 10 , classified as an Uncontrolled Resource Consumption flaw (CWE-400) . It affects Linux kernel versions from 5.10.215 onward and has been patched in 5.10.218. CVE-2021-4440 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2021-4440?
CVE-2021-4440 has a CVSS score of 8.8 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. -
Is there a patch available for CVE-2021-4440?
Yes. CVE-2021-4440 has been patched. Fixed versions include 5.10.218. If you are running Linux kernel 5.10.215 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2021-4440 actively exploited?
No. CVE-2021-4440 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.