CVE-2021-4440
x86/xen: Drop USERGS_SYSRET64 paravirt call
Mitigation
- Upgrade Linux to 1424ab4bb386df9cc590c73afa55f13e9b00dea2 or later.
- Upgrade Linux to 5.10.218 or later.
Who should check
- Anyone running Linux >= cea750c99d8f6391080c420f811a46b21bad7cf4, < 1424ab4bb386df9cc590c73afa55f13e9b00dea2
- Anyone running Linux >= 5.10.215, < 5.10.218
Vulnerability facts
- Affected
- Linux >= cea750c99d8f6391080c420f811a46b21bad7cf4, < 1424ab4bb386df9cc590c73afa55f13e9b00dea2; Linux >= 5.10.215, < 5.10.218
- Fixed in
- Linux 1424ab4bb386df9cc590c73afa55f13e9b00dea2, Linux 5.10.218
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.22% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-400
- Modified
Description
In 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 <carnil@debian.org> 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 ]
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-4440. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-4440.md Affected: Linux >= cea750c99d8f6391080c420f811a46b21bad7cf4, < 1424ab4bb386df9cc590c73afa55f13e9b00dea2; Linux >= 5.10.215, < 5.10.218 Fixed in: Linux 1424ab4bb386df9cc590c73afa55f13e9b00dea2, Linux 5.10.218 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2021-4440 being exploited?
There is no confirmed exploitation: CVE-2021-4440 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-4440?
High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2021-4440?
Linux >= cea750c99d8f6391080c420f811a46b21bad7cf4, < 1424ab4bb386df9cc590c73afa55f13e9b00dea2; Linux >= 5.10.215, < 5.10.218.
Is there a fix for CVE-2021-4440?
Yes. Fixed in Linux 1424ab4bb386df9cc590c73afa55f13e9b00dea2, Linux 5.10.218. Upgrade Linux to 1424ab4bb386df9cc590c73afa55f13e9b00dea2 or later. Upgrade Linux to 5.10.218 or later.
How do I check if I'm affected by CVE-2021-4440?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.