CVE-2021-47507

4.7 MEDIUM

📋 TL;DR

This CVE describes a race condition vulnerability in the Linux kernel's NFS server (nfsd) that can cause a kernel NULL pointer dereference during system startup. The vulnerability occurs when the rpc_pipefs_event() function is called before nfsd_net_id registration completes, leading to a system crash. This affects Linux systems running vulnerable kernel versions with NFS server enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific kernel versions between the regression introduced by commit bd5ae9288d64 and fixed by subsequent patches
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when NFS server (nfsd) is enabled and running. Systems not using NFS server are not affected.

📦 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 →

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 →

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

System crash/kernel panic during boot or mount operations, causing denial of service and potential data loss.

🟠

Likely Case

System instability or crash during NFS server startup or when mounting NFS shares, leading to temporary service disruption.

🟢

If Mitigated

Minor service interruption during system startup if the race condition triggers, but no privilege escalation or data compromise.

🌐 Internet-Facing: LOW - This vulnerability requires local access or NFS client access to trigger, not directly exploitable over the internet.
🏢 Internal Only: MEDIUM - Internal users or systems mounting NFS shares could trigger the crash, causing service disruption.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires triggering the race condition during system startup or NFS operations. This is a reliability issue rather than a security vulnerability that enables arbitrary code execution.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with fixes from the provided git commits

Vendor Advisory: https://git.kernel.org/stable/c/8bf902fee5893cfc2f04a698abab47629699ae9a

Restart Required: Yes

Instructions:

1. Update to a kernel version containing the fix commits. 2. Check your distribution's security advisories for specific patched kernel versions. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Disable NFS server

linux

If NFS server functionality is not required, disable it to eliminate the vulnerability.

systemctl stop nfs-server
systemctl disable nfs-server

🧯 If You Can't Patch

  • Ensure NFS server is only started after all other services are stable to reduce race condition likelihood
  • Monitor system logs for NFS-related crashes and have recovery procedures ready

🔍 How to Verify

Check if Vulnerable:

Check kernel version and verify if NFS server is running: 'uname -r' and 'systemctl status nfs-server'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to a patched version and test NFS server startup/mount operations

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • NULL pointer dereference errors in dmesg
  • NFS server crash logs

Network Indicators:

  • Unexpected NFS service unavailability

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "nfsd" OR "rpc_pipefs_event")

🔗 References

📤 Share & Export