CVE-2026-99396 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
xfs: bound da-node entry count against the correct geometry
xfs_da3_node_verify() bounds the node entry count against the larger of the directory and attribute geometries because, as a buffer verifier, it cannot tell whether the block belongs to the directory or the attribute tree. When the directory block size exceeds the fs block size (e.g. mkfs.xfs -n size=64k -b size=4k), an attribute node buffer is a single fs block that holds only m_attr_geo->node_ents entries, yet a crafted attr node may claim a count up to m_dir_geo->node_ents and still pass the verifier.
xfs_da3_node_lookup_int() then indexes btree[] up to that count during
its binary search -- an out-of-bounds read via getxattr/listxattr on a mounted crafted image.
The buffer verifier is the wrong place to tighten this: it has no fork context, and the transaction-less read path used by getxattr does not run xfs_da3_node_set_type() either. xfs_da3_node_lookup_int(), on the other hand, always runs on that path and holds args->geo, the geometry of the fork actually being searched. Bound the entry count against args->geo->node_ents there, before walking the entries.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/22/2026
The vulnerability identified in the Linux kernel's XFS filesystem implementation involves a critical boundary check failure within the directory attribute handling logic. Specifically, the issue resides in how node entry counts are validated during read operations on crafted file images. The root cause stems from an incorrect geometric assumption made by the buffer verifier function xfs_da3_node_verify(). This function is responsible for validating metadata blocks before they are processed further up the stack. However, because it operates as a generic buffer verifier without context regarding whether the block belongs to the directory fork or the attribute fork, it applies a permissive validation strategy. It bounds the node entry count against the larger of the two possible geometries, effectively assuming that any single filesystem block could potentially hold entries from either tree structure based on their maximum capacities.
This approach creates a significant security gap when the file system is configured with non-standard geometry settings, such as using mkfs.xfs with a directory size significantly larger than the standard block size while keeping the attribute space smaller or vice versa. In scenarios where the directory block size exceeds the filesystem block size, an attribute node buffer will physically occupy only one filesystem block and thus contain fewer entries than what is theoretically possible for a full directory block. Despite this physical limitation, the verifier allows crafted attribute nodes to claim entry counts that match the larger directory geometry limits. Consequently, these oversized claims pass validation checks without triggering errors, allowing maliciously constructed metadata to be accepted by the kernel as valid.
The exploitation of this flaw occurs during subsequent lookup operations performed by xfs_da3_node_lookup_int(). This function conducts binary searches on btree arrays using the entry count previously validated and stored in memory. Because the verifier failed to restrict the count to the actual physical capacity of the attribute fork, the lookup routine proceeds to index into the array beyond its allocated bounds. When a user invokes system calls such as getxattr or listxattr against this crafted image mounted on the filesystem, the kernel performs an out-of-bounds read operation. This memory access violation can lead to information disclosure by leaking kernel stack data or heap contents to unprivileged userspace processes that issued the attribute queries.
From a technical classification perspective, this vulnerability aligns with CWE-125 Out-of-Bounds Read and CWE-20 Improper Input Validation within the context of filesystem metadata parsing. The attack vector is categorized under ATT&CK technique T1083 File and Directory Discovery, as it relies on reading system attributes to gather information about the target environment. While typically resulting in non-privileged information disclosure rather than immediate code execution due to read-only nature, such vulnerabilities can serve as stepping stones for more complex attacks if combined with other primitives or if specific kernel memory layouts are exploited via side-channel techniques.
The resolution involves correcting the validation logic by moving the boundary check from the generic buffer verifier to the context-aware lookup function xfs_da3_node_lookup_int(). Since this function operates within a transaction-less read path and holds access to args->geo, it possesses the necessary fork-specific geometry information to perform accurate bounds checking. By validating that the node entry count does not exceed the specific limits of the attribute or directory tree being searched before walking the entries, the kernel ensures that memory accesses remain strictly within allocated boundaries. This patch effectively neutralizes the out-of-bounds read condition by enforcing strict adherence to actual physical storage constraints rather than theoretical maximums derived from mismatched geometry settings.
To mitigate this risk in environments running affected versions of the Linux kernel with XFS filesystem support, immediate application of the upstream kernel patches is required. System administrators should verify their current kernel version and apply updates provided by their distribution vendors that include fixes for xfs_da3_node_lookup_int validation logic. Additionally, organizations relying on custom or non-standard mkfs.xfs configurations should audit their file system creation scripts to ensure consistency between directory and attribute block sizes where possible, reducing the attack surface even before patching is applied. Regular vulnerability scanning focused on filesystem integrity and metadata corruption detection can also help identify potentially maliciously crafted images attempting to exploit similar logic flaws in storage subsystems.