CVE-2026-99418 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
ovl: do not copy up an xattr value that was never read
Copy-up stores uninitialized kernel memory in an xattr of the upper file, where the user can read it.
ovl_copy_xattr() may only pass bytes to ovl_do_setxattr() that ovl_do_getxattr() has read. When the read fails with -ERANGE the function asks for the size again, and if the new size fits the buffer it stores the buffer although nothing was read into it. The buffer comes from kvmalloc(), or it still holds the value of the previous xattr.
A FUSE lower layer that answers every sized GETXATTR with -ERANGE made copy-up store 4096 bytes that the server never sent, with a kernel pointer in them, as an xattr of the upper file.
Fix this by failing the copy-up with -EIO when the size that follows -ERANGE fits the buffer.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/19/2026
The Linux overlay filesystem presents a critical information disclosure vulnerability within its extended attribute handling logic, specifically during the copy-up process from lower to upper layers. This flaw arises in the ovl_copy_xattr function, which is responsible for transferring file attributes when files are modified and need to be copied up to an writable upper layer. The core technical deficiency lies in how the kernel handles buffer allocation and data retrieval when dealing with extended attribute values that exceed initial buffer sizes. When a request to retrieve an extended attribute fails due to insufficient buffer space, indicated by an -ERANGE error code, the system attempts to reallocate memory or adjust its approach based on the reported required size. However, in certain edge cases involving specific lower layer implementations such as FUSE, this logic can be exploited because the function proceeds to store data into a newly allocated buffer without verifying that any actual bytes were successfully read from the source.
The operational mechanism of this vulnerability allows uninitialized kernel memory to persist within the upper file's extended attributes. The ovl_copy_xattr routine may invoke ovl_do_getxattr, which might return -ERANGE if the provided buffer is too small. In response, the code recalculates the size and allocates a new buffer via kvmalloc. If this newly sized buffer fits within expected limits but no data has been written into it because the read operation effectively failed or returned zero bytes due to the nature of the lower layer's response, the function erroneously proceeds to call ovl_do_setxattr. This results in writing whatever garbage data currently resides in that memory region—potentially including kernel pointers from previous allocations—to the upper file system as an extended attribute value. Since these attributes are accessible by user-space applications, this creates a direct pathway for leaking sensitive kernel information.
The impact of this vulnerability is significant, primarily categorized under CWE-200: Information Exposure and CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer. An attacker with access to the affected file system can read these extended attributes using standard system calls such as getxattr or listxattr. By doing so, they can extract uninitialized kernel memory contents. In scenarios where the lower layer is implemented via FUSE and deliberately responds to every sized GETXATTR request with -ERANGE regardless of actual data availability, an attacker could force the copy-up process to store up to 4096 bytes of uninitialized memory per attribute. This includes potential kernel pointers that can be leveraged for further exploitation techniques such as Kernel Address Space Layout Randomization bypasses or arbitrary read/write primitives if combined with other vulnerabilities.
This behavior aligns closely with ATT&CK technique T1083: File and Directory Discovery, where adversaries enumerate file properties to gather intelligence about the system state. Furthermore, it represents a classic case of improper input validation leading to memory safety issues, specifically falling under CWE-457: Use of Uninitialized Variable within the context of kernel space operations. The vulnerability highlights the risks associated with assuming that size adjustments following an error code guarantee successful data retrieval without explicit verification of byte counts returned by lower-level drivers or filesystem implementations.
To mitigate this risk, it is essential to apply the upstream Linux kernel patch that modifies ovl_copy_xattr to fail the copy-up operation with -EIO when a subsequent size adjustment fits the buffer but no actual read occurred. This ensures that only verified data is propagated to the upper layer. System administrators should ensure their kernels are updated to include this fix, which prevents the storage of uninitialized memory in extended attributes. Additionally, developers implementing custom lower layers for overlay filesystems must rigorously validate return codes and byte counts from getxattr operations before allowing copy-up procedures to proceed, ensuring that no partial or empty buffers are treated as valid data sources. Regular auditing of file system interactions and monitoring for unusual extended attribute values can also aid in detecting potential exploitation attempts in environments where this vulnerability might be present prior to patching.