CVE-2024-56558
📋 TL;DR
This CVE describes a use-after-free vulnerability in the Linux kernel's NFS server (nfsd) where improper reference counting during cache operations could trigger a kernel warning or potential crash. It affects Linux systems running NFS server functionality. The vulnerability requires local access to trigger but could lead to denial of service.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Kernel panic or system crash leading to denial of service, potentially disrupting NFS services and affecting dependent systems.
Likely Case
Kernel warning messages in logs and potential NFS service instability, but full system crash is less likely without intentional exploitation.
If Mitigated
Minor performance impact from warning messages with no service disruption if proper kernel protections are active.
🎯 Exploit Status
Exploitation requires local access and specific knowledge of triggering the vulnerable code path through NFS operations. The vulnerability was discovered through code review and debugging, not active exploitation.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in Linux kernel commit 1cecfdbc6bfc89c516d286884c7f29267b95de2b and backported to stable branches
Vendor Advisory: https://git.kernel.org/stable/c/1cecfdbc6bfc89c516d286884c7f29267b95de2b
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing fix commit 1cecfdbc6bfc89c516d286884c7f29267b95de2b or later. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Disable NFS server
linuxTemporarily disable nfsd service if NFS server functionality is not required
systemctl stop nfs-server
systemctl disable nfs-server
Restrict access to /proc/fs/nfs/exports
linuxLimit which users can access the vulnerable interface
chmod 600 /proc/fs/nfs/exports
chown root:root /proc/fs/nfs/exports
🧯 If You Can't Patch
- Disable NFS server functionality if not required
- Implement strict access controls to limit which users can interact with NFS server operations
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if nfsd is active: uname -r && systemctl is-active nfs-server
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version contains fix commit: grep -q '1cecfdbc6bfc89c516d286884c7f29267b95de2b' /proc/version_signature || echo 'Check kernel changelog'
📡 Detection & Monitoring
Log Indicators:
- Kernel logs containing 'refcount_t: addition on 0; use-after-free'
- WARNING messages from nfsd in dmesg
- System crashes or instability related to NFS operations
Network Indicators:
- Unusual NFS request patterns from local users
- NFS service interruptions
SIEM Query:
source="kernel" AND "refcount_warn_saturate" AND "nfsd" OR source="dmesg" AND "use-after-free" AND "e_show"
🔗 References
- https://git.kernel.org/stable/c/1cecfdbc6bfc89c516d286884c7f29267b95de2b
- https://git.kernel.org/stable/c/6cefcadd34e3c71c81ea64b899a0daa86314a51a
- https://git.kernel.org/stable/c/7365d1f8de63cffdbbaa2287ce0205438e1a922f
- https://git.kernel.org/stable/c/7d8f7816bebcd2e7400bb4d786eccb8f33c9f9ec
- https://git.kernel.org/stable/c/7fd29d284b55c2274f7a748e6c5f25b4758b8da5
- https://git.kernel.org/stable/c/be8f982c369c965faffa198b46060f8853e0f1f0
- https://git.kernel.org/stable/c/e2fa0d0e327279a8defb87b263cd0bf288fd9261
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html