CVE-2026-99417 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
ovl: fix a torn path in ovl_get_redirect()
A hard link of a metacopy file that races with a rename of an ancestor stores a redirect to the wrong lower file.
Each component of an absolute redirect must be the name that a dentry has in the parent that the walk continues with. ovl_get_redirect() copies the name under d_lock and calls dget_parent() after the unlock, and the callers for a hard link hold no lock that stops a rename across directories. A rename between the two steps combines the old name with the new parent.
With delays in ovl_get_redirect(), an unprivileged user hard-linked a metacopy file while renaming its ancestor to another directory, the stored redirect named another lower path, and after a remount the file showed the data of a root-only file.
Fix this by taking the parent first and checking it again under d_lock.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability identified in the Linux kernel's overlay filesystem (ovl) subsystem represents a critical race condition within the ovl_get_redirect function, specifically affecting metacopy files that are subject to hard linking operations concurrent with directory renames. Metacopy is an optimization feature used by overlayfs where file data resides on lower layers while metadata such as redirects points to them; however, this mechanism relies heavily on strict consistency between dentry names and their parent directories during path resolution. The core technical flaw lies in the sequence of lock acquisition and release within ovl_get_redirect(). Specifically, the function copies the directory entry name under the protection of d_lock but subsequently calls dget_parent() after releasing that lock. This temporal gap creates a window where an unprivileged user can execute a rename operation on an ancestor directory between these two steps. Because no additional locking mechanism prevents concurrent cross-directory renames during this interval, the parent pointer retrieved may correspond to a different directory than the one originally associated with the dentry name.
This race condition results in a torn path scenario where the stored redirect information becomes inconsistent with the actual filesystem state. When an unprivileged user hard links a metacopy file while simultaneously renaming its ancestor to another directory, the system incorrectly associates the old filename component with the new parent directory structure. Consequently, the resulting redirect points to an incorrect lower layer file rather than the intended target. This inconsistency is particularly dangerous because it persists in metadata structures that are validated upon subsequent operations or filesystem remounts. The operational impact manifests as a severe integrity violation where a user accessing what they believe to be their own hard-linked file may instead retrieve data belonging to a root-only file from another part of the lower layer stack. This effectively bypasses standard access controls, allowing privilege escalation through information disclosure and potential unauthorized modification if write permissions are also misaligned due to similar race conditions in other parts of the overlay logic.
From a classification perspective, this vulnerability aligns with CWE-362, which describes concurrent execution using shared resources with improper synchronization leading to race conditions. The specific mechanism involves insufficient locking granularity during critical path resolution steps, allowing external state changes to corrupt internal consistency checks. In terms of adversarial tactics, this flaw supports ATT&CK technique T1078, Valid Accounts, as it allows an unprivileged user to leverage legitimate system mechanisms like hard links and renames to access restricted resources. Furthermore, the persistence of incorrect redirects across remounts relates to CWE-20, Improper Input Validation, where the filesystem fails to validate that the parent directory matches the expected context before finalizing the redirect path. The vulnerability highlights a broader class of issues in virtual filesystem implementations where performance optimizations like metacopy introduce complex dependencies on dentry lifecycles and locking hierarchies that are difficult to maintain correctly under high concurrency.
The resolution implemented by the Linux kernel developers addresses this flaw by altering the lock acquisition order within ovl_get_redirect(). Instead of releasing d_lock before retrieving the parent directory, the fix mandates taking the parent reference first while still holding appropriate locks or ensuring atomicity through re-validation under d_lock. By checking the parent again under the protection of d_lock, the kernel ensures that the relationship between the dentry name and its parent remains consistent throughout the entire path resolution process. This prevents a rename operation from altering the parent context in the narrow window previously exploited by attackers. To mitigate similar risks in other contexts or to protect against this specific issue on affected systems, administrators should ensure their kernels are updated with patches that include this locking fix. Additionally, minimizing the use of hard links for sensitive metacopy files and avoiding concurrent rename operations on directories containing such files can reduce exposure until patching is applied. Regular auditing of overlay filesystem configurations and monitoring for unexpected file content changes in shared or multi-user environments serves as a defensive measure against exploitation attempts that rely on timing-based race conditions to bypass access controls.