Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-39463 Overview
CVE-2024-39463 is a use-after-free vulnerability [CWE-416] in the Linux kernel's 9p (Plan 9) filesystem implementation. The flaw exists in the handling of a dentry's d_fsdata fid list, where missing locking allows one thread to look up a fid through a dentry while another thread concurrently unlinks it. Successful exploitation results in a reference count operation on freed memory, leading to local privilege escalation or kernel memory corruption. The vulnerability affects systems that mount 9p filesystems, commonly used in virtualization and container scenarios.
Critical Impact
A local attacker with low privileges can trigger a use-after-free in the kernel 9p filesystem code, enabling privilege escalation and full compromise of confidentiality, integrity, and availability.
Affected Products
- Linux Kernel versions prior to the patched commits
- Linux Kernel 6.10-rc1
- Systems mounting 9p filesystems (common in QEMU/KVM guests and container runtimes)
Discovery Timeline
- 2024-06-25 - CVE-2024-39463 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-39463
Vulnerability Analysis
The vulnerability resides in the 9p filesystem client code within the Linux kernel. The d_fsdata field of a dentry stores a list of 9p file identifiers (fids) associated with that dentry. The code failed to acquire d_lock when accessing this fid list from v9fs_fid_find() and related lookup paths.
Under normal circumstances, d_release() is only invoked once a dentry is no longer accessible, so unprotected access to d_fsdata would be safe. However, the 9p code explicitly calls v9fs_dentry_release() from v9fs_remove() during unlink operations. This creates a window where one thread executing vfs_statx() can walk the fid list via v9fs_fid_lookup() while another thread performing vfs_unlink() frees those same fids through p9_client_clunk() and p9_fid_destroy().
Root Cause
The root cause is missing synchronization around access to the dentry fid list stored in d_fsdata. The code assumed d_release() serialization semantics that do not hold when the function is invoked explicitly during an unlink operation rather than at the normal end-of-life for the dentry. This permits a race between fid lookup and fid destruction paths.
Attack Vector
Exploitation requires local access and low privileges on a system with a mounted 9p filesystem. An attacker runs two concurrent threads: one repeatedly calls stat() on a target path to trigger v9fs_fid_lookup(), while the other calls unlink() on the same path to trigger v9fs_remove(). Winning the race causes p9_fid_get() to increment a refcount_t on freed memory, producing the addition on 0; use-after-free condition reported in kernel logs. From this primitive, an attacker can corrupt kernel memory and escalate privileges.
The exploitation mechanism is described in the upstream patch commits and in the Zero Day Initiative advisory ZDI-24-1194.
Detection Methods for CVE-2024-39463
Indicators of Compromise
- Kernel log entries containing refcount_t: addition on 0; use-after-free referencing p9_fid_get or v9fs_fid_find
- Kernel oops or panic traces originating in fs/9p/fid.c or fs/9p/vfs_inode.c
- Unexpected process privilege transitions on hosts with mounted 9p shares
Detection Strategies
- Audit mounted filesystems for 9p or v9fs entries using mount or /proc/mounts and inventory which workloads use them
- Monitor kernel ring buffer (dmesg) and /var/log/kern.log for KASAN reports or refcount warnings referencing 9p symbols
- Correlate unlink and stat syscalls on the same path from different processes using auditd rules on 9p mount points
Monitoring Recommendations
- Enable kernel address sanitizer (KASAN) builds in test environments to surface use-after-free conditions during QA
- Forward kernel logs to a central SIEM and alert on refcount or UAF signatures tied to 9p symbols
- Track running kernel versions across the fleet and flag hosts still on vulnerable builds
How to Mitigate CVE-2024-39463
Immediate Actions Required
- Update the Linux kernel to a version containing the upstream fix from your distribution vendor
- Unmount 9p filesystems where they are not strictly required, particularly on multi-tenant hosts
- Restrict local shell and container escape surfaces that would allow an unprivileged user to trigger the race
Patch Information
The upstream fix moves the hlist out of the dentry under d_lock, then unreferences its fids once they are no longer accessible to other threads. The patch is distributed across multiple stable branches via the following commits: 3bb6763, c898afdc, cb299cdb, f0c5c944, and fe17ebf2. Apply the patched kernel from your distribution and reboot.
Workarounds
- Avoid mounting 9p filesystems on hosts where untrusted local users or workloads run
- In virtualization setups, prefer virtiofs or alternative share mechanisms until the host and guest kernels are patched
- Blacklist the 9p and 9pnet kernel modules on systems where they are not required using /etc/modprobe.d/
# Blacklist 9p modules until the kernel is patched
echo 'blacklist 9p' | sudo tee /etc/modprobe.d/disable-9p.conf
echo 'blacklist 9pnet' | sudo tee -a /etc/modprobe.d/disable-9p.conf
echo 'blacklist 9pnet_virtio' | sudo tee -a /etc/modprobe.d/disable-9p.conf
sudo update-initramfs -u
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

