CVE-2021-46952

7.1 HIGH

📋 TL;DR

This vulnerability in the Linux kernel's NFS implementation allows an attacker to trigger a shift out-of-bounds error by passing a maliciously large 'retrans' mount option when mounting an NFS share over UDP. This could lead to kernel memory corruption or system crashes. Systems using NFS over UDP with custom mount options are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only affects NFS mounts using UDP transport protocol with custom retrans values >= 64. Default NFS configurations are not vulnerable.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to denial of service, or potential kernel memory corruption that could be leveraged for privilege escalation.

🟠

Likely Case

System crash or kernel panic when mounting NFS shares with malicious retrans values, causing denial of service.

🟢

If Mitigated

Mount operation fails with error, preventing exploitation.

🌐 Internet-Facing: LOW - Requires ability to mount NFS shares, which is typically not exposed to untrusted networks.
🏢 Internal Only: MEDIUM - Internal attackers with NFS mount privileges could cause system instability.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Syzkaller fuzzer discovered this vulnerability. Exploitation requires ability to mount NFS shares with custom options.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commits 2f3380121d49e829fb73ba86240c181bc32ad897 or equivalent backports

Vendor Advisory: https://git.kernel.org/stable/c/2f3380121d49e829fb73ba86240c181bc32ad897

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable NFS over UDP

linux

Configure NFS to use TCP only instead of UDP transport

mount -t nfs -o proto=tcp server:/share /mountpoint

Restrict NFS mount privileges

linux

Limit who can mount NFS shares using sudoers or other access controls

🧯 If You Can't Patch

  • Disable NFS UDP mounts entirely by removing UDP support from NFS configuration
  • Implement strict input validation for NFS mount options in wrapper scripts

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if NFS UDP is enabled: uname -r && cat /proc/fs/nfsd/portlist

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched and test mounting with retrans=64 should fail with error

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • NFS mount failures with large retrans values
  • System crash reports

Network Indicators:

  • Unexpected NFS mount attempts with unusual options

SIEM Query:

source="kernel" AND ("panic" OR "oops") AND "nfs"

🔗 References

📤 Share & Export