CVE-2021-46952·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds Fix shift out-of-bounds in xprt_calc_majortimeo(). This is caused by a garbage timeout (retrans) mount option being passed to nfs mount, in this case from syzkaller. If the protocol is XPRT_TRANSPORT_UDP, then 'retrans' is a shift value for a 64-bit long integer, so 'retrans' cannot be >= 64. If it is >= 64, fail the mount and return an error.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.3
- Published
- 2024-02-27
Affected versions
From: 5.12.0
Until: 5.12.3
Fixed in: 5.12.3
How to fix this CVE
Update your Linux kernel to version 5.12.3 or later to patch this shift out-of-bounds vulnerability in NFS UDP transport handling. The vulnerability allows invalid retrans mount parameters to trigger a kernel crash. Ensure you test the kernel update in a non-production environment before rolling out to critical systems.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version: uname -r — verify it is 5.12.0, 5.12.1, or 5.12.2 (vulnerable range)
- Verify NFS UDP transport is enabled: grep -i 'proto=udp' /proc/mounts — if present, your system may be at higher risk
- Search kernel logs for shift-related panics: grep -i 'shift' /var/log/kern.log or journalctl -k | grep -i 'shift'
- Confirm patch applied: uname -r should show 5.12.3 or later; verify with: cat /boot/config-$(uname -r) | grep CONFIG_NFS
FAQ
What is CVE-2021-46952?
This vulnerability exists in the Linux kernel's NFS mount option validation for UDP transport. When an attacker or misconfigured system passes an extremely large retrans value (>= 64) during NFS mount, it causes a bit-shift operation to overflow, crashing the kernel.
Is CVE-2021-46952 being actively exploited?
No, this CVE is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are available. However, local attackers with mount privileges could trigger it via malformed mount parameters.
What versions of Kernel are affected by CVE-2021-46952?
Linux kernel versions 5.12.0 through 5.12.2 are vulnerable. Version 5.12.3 and all later versions contain the fix.
How do I check if my server is vulnerable to CVE-2021-46952?
Run: uname -r — if the output shows 5.12.0, 5.12.1, or 5.12.2, your system is vulnerable. For other kernel versions (5.11.x or earlier, 5.13+), you are not affected.
Does Defensia detect CVE-2021-46952?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-46952 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2f3380121d49e829fb73ba86240c181bc32ad897
- https://git.kernel.org/stable/c/3d0163821c035040a46d816a42c0780f0f0a30a8
- https://git.kernel.org/stable/c/96fa26b74cdcf9f5c98996bf36bec9fb5b19ffe2
- https://git.kernel.org/stable/c/c09f11ef35955785f92369e25819bf0629df2e59
- https://git.kernel.org/stable/c/2f3380121d49e829fb73ba86240c181bc32ad897
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-46952. Free for 1 server.
Get started free