CVE-2024-35882
📋 TL;DR
A memory leak vulnerability in the Linux kernel's SUNRPC implementation allows unprivileged remote attackers to cause memory exhaustion on NFS servers using RPC-over-TCP. This affects Linux systems running NFS servers with the vulnerable kernel code. The leak occurs when processing RPC messages, gradually consuming system memory until exhaustion.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Complete system memory exhaustion leading to denial of service, system crashes, and potential data loss on affected NFS servers.
Likely Case
Gradual memory consumption causing performance degradation and eventual service disruption on NFS servers after several days of operation.
If Mitigated
Minimal impact with proper monitoring and memory limits in place, though gradual degradation may still occur over time.
🎯 Exploit Status
Exploitation requires sending RPC requests to vulnerable NFS servers. No authentication needed. The vulnerability is straightforward to trigger by normal NFS client operations.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions with fixes: 05258a0a69b3c5d2c003f818702c0a52b6fea861, 1ba1291172f935e6b6fe703161a948f3347400b8, a2ebedf7bcd17a1194a0a18122c885eb578ee882
Vendor Advisory: https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Disable NFS RPC-over-TCP
linuxSwitch NFS to use RPC-over-RDMA instead of TCP if supported by your infrastructure
# Edit /etc/nfs.conf or distribution-specific NFS configuration
# Set transport protocol to rdma instead of tcp
Implement memory limits
linuxUse cgroups or systemd to limit memory usage of NFS server processes
# Using systemd: systemctl set-property nfs-server.service MemoryMax=value
# Using cgroups: echo value > /sys/fs/cgroup/memory/nfs/memory.limit_in_bytes
🧯 If You Can't Patch
- Restrict NFS access to trusted clients only using firewall rules and authentication
- Implement aggressive monitoring and alerting for memory consumption on NFS servers
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if NFS server is running with RPC-over-TCP: 'uname -r' and 'rpcinfo -p | grep nfs'
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is patched and monitor memory usage of NFS processes over time: 'cat /proc/meminfo' and 'ps aux | grep nfs'
📡 Detection & Monitoring
Log Indicators:
- Increasing memory usage in /var/log/messages or dmesg
- OOM killer messages related to NFS processes
- System performance degradation logs
Network Indicators:
- Unusual volume of RPC requests to NFS servers
- TCP connections to NFS port 2049 from unexpected sources
SIEM Query:
source="kernel" AND ("Out of memory" OR "oom-killer") AND process="nfs"
🔗 References
- https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861
- https://git.kernel.org/stable/c/1ba1291172f935e6b6fe703161a948f3347400b8
- https://git.kernel.org/stable/c/a2ebedf7bcd17a1194a0a18122c885eb578ee882
- https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861
- https://git.kernel.org/stable/c/1ba1291172f935e6b6fe703161a948f3347400b8
- https://git.kernel.org/stable/c/a2ebedf7bcd17a1194a0a18122c885eb578ee882