CVE-2021-47320
📋 TL;DR
This CVE describes a memory leak vulnerability in the Linux kernel's NFS (Network File System) implementation. When the posix_acl_create() function fails during file creation operations (nfs3_proc_create and nfs3_proc_mknod), it doesn't properly free allocated ACL (Access Control List) memory, leading to gradual memory exhaustion. This affects Linux systems using NFSv3 with ACL support.
💻 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 →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
Sustained exploitation could lead to kernel memory exhaustion, causing system instability, denial of service, or potential kernel crashes on affected systems.
Likely Case
Gradual memory consumption over time in NFS-heavy environments, potentially leading to performance degradation or service interruptions.
If Mitigated
Minimal impact with proper monitoring and memory limits in place; isolated to NFS operations only.
🎯 Exploit Status
Exploitation requires ability to trigger NFS file creation failures repeatedly; memory leak is gradual rather than immediate.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions with the fix backported (check specific distribution)
Vendor Advisory: https://git.kernel.org/stable/c/0704f617040c397ae73c1f88f3956787ec5d6529
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution. 2. For RHEL/CentOS: yum update kernel. 3. For Ubuntu/Debian: apt update && apt upgrade linux-image. 4. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable NFS ACL support
linuxDisable POSIX ACL support in NFS exports to prevent triggering the vulnerable code path
Edit /etc/exports and remove 'acl' option from NFS shares
Export without ACL: /share *(rw,sync,no_subtree_check)
Limit NFS access
linuxRestrict NFS access to trusted networks and users only
Configure /etc/exports with specific IP ranges: /share 192.168.1.0/24(rw,sync)
Use firewall rules: iptables -A INPUT -p tcp --dport 2049 -s trusted_network -j ACCEPT
🧯 If You Can't Patch
- Disable NFSv3 and use NFSv4 instead (not affected)
- Implement memory monitoring and alerts for kernel memory usage
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if NFSv3 with ACL is enabled: cat /proc/version && grep acl /etc/exports
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is updated and check for memory leaks during NFS operations: dmesg | grep -i 'nfs.*acl'
📡 Detection & Monitoring
Log Indicators:
- Kernel OOM (Out of Memory) messages in dmesg
- Increasing kernel memory usage in /proc/meminfo
- NFS error logs with file creation failures
Network Indicators:
- Unusual NFS traffic patterns with repeated file creation attempts
SIEM Query:
source="kernel" AND ("out of memory" OR "OOM") AND "nfs"
🔗 References
- https://git.kernel.org/stable/c/0704f617040c397ae73c1f88f3956787ec5d6529
- https://git.kernel.org/stable/c/1fcb6fcd74a222d9ead54d405842fc763bb86262
- https://git.kernel.org/stable/c/2e3960f276b4574a9bb0dfa31a7497302f6363b2
- https://git.kernel.org/stable/c/4b515308ab875c7e8ada8e606fe0c64762da5ed4
- https://git.kernel.org/stable/c/687cf32865b2d6960214bce523f2afac58dd3cd2
- https://git.kernel.org/stable/c/8a2b308a54c5ec224fedc753617f99b29ffcd883
- https://git.kernel.org/stable/c/c8fc86e9df6a6a03f5a8e15a3b7a5c75fd05aa38
- https://git.kernel.org/stable/c/cef9d9acb7c80ed6bace894b6334557fd493863b
- https://git.kernel.org/stable/c/d0b32dc1409f7e65e4fcc34e236462268e69a357
- https://git.kernel.org/stable/c/0704f617040c397ae73c1f88f3956787ec5d6529
- https://git.kernel.org/stable/c/1fcb6fcd74a222d9ead54d405842fc763bb86262
- https://git.kernel.org/stable/c/2e3960f276b4574a9bb0dfa31a7497302f6363b2
- https://git.kernel.org/stable/c/4b515308ab875c7e8ada8e606fe0c64762da5ed4
- https://git.kernel.org/stable/c/687cf32865b2d6960214bce523f2afac58dd3cd2
- https://git.kernel.org/stable/c/8a2b308a54c5ec224fedc753617f99b29ffcd883
- https://git.kernel.org/stable/c/c8fc86e9df6a6a03f5a8e15a3b7a5c75fd05aa38
- https://git.kernel.org/stable/c/cef9d9acb7c80ed6bace894b6334557fd493863b
- https://git.kernel.org/stable/c/d0b32dc1409f7e65e4fcc34e236462268e69a357