CVE-2024-14027 Overview
A memory leak vulnerability has been identified in the Linux kernel's extended attribute (xattr) subsystem. The fremovexattr() syscall improperly handles file references when the strncpy_from_user() function fails on the name argument, causing the syscall to return early without calling fdput() to release the file reference acquired by fdget().
Critical Impact
In multi-threaded processes where fdget() takes the slow path, this vulnerability permanently leaks one file reference per call, pinning the struct file and associated kernel objects in memory. An unprivileged local user can exploit this to cause kernel memory exhaustion, leading to system instability or denial of service.
Affected Products
- Linux kernel (versions with the vulnerable fremovexattr() implementation)
- Systems using extended attributes (xattr) functionality
- Multi-threaded applications utilizing the fremovexattr() syscall
Discovery Timeline
- 2026-03-09 - CVE CVE-2024-14027 published to NVD
- 2026-03-11 - Last updated in NVD database
Technical Details for CVE-2024-14027
Vulnerability Analysis
This vulnerability is a Memory Leak that occurs in the fs/xattr subsystem of the Linux kernel. The flaw exists in the error handling path of the fremovexattr() syscall, which is responsible for removing extended attributes from files.
When fremovexattr() is called, it first acquires a file reference using fdget(). This function obtains a reference to the file descriptor, which must later be released with a corresponding fdput() call. However, when strncpy_from_user() fails to copy the attribute name from user space, the function returns an error without properly releasing the file reference.
The impact is particularly severe in multi-threaded processes. In these scenarios, fdget() uses a "slow path" that increments a reference counter on the struct file. Without the corresponding fdput(), this reference is never decremented, permanently pinning the kernel memory structure.
Root Cause
The root cause is a missing fdput() call in the error handling path of fremovexattr(). When strncpy_from_user() returns an error (such as when copying the attribute name from user space fails), the function exits immediately without releasing the file reference that was acquired at the beginning of the function. This is a classic resource leak pattern where error paths fail to clean up previously allocated or acquired resources.
Attack Vector
An unprivileged local attacker can exploit this vulnerability by:
- Creating a multi-threaded process to ensure fdget() uses the slow path
- Repeatedly calling fremovexattr() with invalid user space pointers for the attribute name, causing strncpy_from_user() to fail
- Each failed call leaks one file reference, incrementally consuming kernel memory
- Continuing the attack until kernel memory is exhausted, causing denial of service
The vulnerability can be triggered without special privileges, as fremovexattr() is a standard syscall available to unprivileged users. The exploitation does not require any special system configuration beyond the presence of the vulnerable kernel code.
Detection Methods for CVE-2024-14027
Indicators of Compromise
- Unexplained growth in kernel memory usage, particularly in file-related structures
- Increasing count of struct file objects that are not being freed
- System memory pressure without corresponding user-space memory consumption
- Kernel log messages indicating memory allocation failures or OOM conditions
Detection Strategies
- Monitor kernel memory statistics for abnormal growth in slab allocations related to file structures
- Track fremovexattr() syscall patterns for unusual frequency or error rates
- Implement auditd rules to log excessive fremovexattr() calls from specific processes
- Use kernel memory profiling tools to identify leaked struct file objects
Monitoring Recommendations
- Enable kernel memory leak detection tools such as kmemleak in development environments
- Monitor /proc/slabinfo for unusual growth in filp cache entries
- Set up alerts for sustained kernel memory growth without corresponding workload changes
- Review system logs for OOM killer activity that may indicate memory exhaustion attacks
How to Mitigate CVE-2024-14027
Immediate Actions Required
- Update to a Linux kernel version that includes the fix from commit a71874379ec8
- Apply vendor-provided security patches as soon as they become available
- Monitor systems for unusual memory consumption patterns
- Consider restricting access to multi-user systems until patches are applied
Patch Information
The vulnerability was inadvertently fixed by commit a71874379ec8 ("xattr: switch to CLASS(fd)"). This commit refactored the file descriptor handling to use the CLASS(fd) mechanism, which provides automatic cleanup of file references through scope-based resource management.
The fix is available through the official Linux kernel source tree. For detailed patch information, see the Linux Kernel Commit Change.
Organizations should check with their Linux distribution vendor for backported patches specific to their supported kernel versions.
Workarounds
- Limit access to systems to trusted users only, as the vulnerability requires local access
- Monitor and alert on processes making excessive fremovexattr() syscalls
- Implement resource limits (cgroups) to contain potential memory exhaustion attacks
- Consider using seccomp filters to restrict fremovexattr() access for non-essential applications
# Example: Monitor fremovexattr syscalls using auditd
auditctl -a always,exit -F arch=b64 -S fremovexattr -k xattr_monitor
# Review audit logs for suspicious activity
ausearch -k xattr_monitor --interpret
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

