CVE-2021-47507
📋 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
- Linux kernel
📦 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.
🎯 Exploit Status
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
linuxIf 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
- https://git.kernel.org/stable/c/8bf902fee5893cfc2f04a698abab47629699ae9a
- https://git.kernel.org/stable/c/b10252c7ae9c9d7c90552f88b544a44ee773af64
- https://git.kernel.org/stable/c/c520943a00ad5015704969ad3304c956bcd49d25
- https://git.kernel.org/stable/c/f5734b1714ca355703e9ea8fb61d04beff1790b9
- https://git.kernel.org/stable/c/8bf902fee5893cfc2f04a698abab47629699ae9a
- https://git.kernel.org/stable/c/b10252c7ae9c9d7c90552f88b544a44ee773af64
- https://git.kernel.org/stable/c/c520943a00ad5015704969ad3304c956bcd49d25
- https://git.kernel.org/stable/c/f5734b1714ca355703e9ea8fb61d04beff1790b9