CVE-2026-99423 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
ovl: take a snapshot of the name for copy up
The copy up of a directory reads a freed dentry name when a lookup moves the directory at the same time.
A pointer to the name of a dentry is only valid while something stops a move of the dentry. ovl_do_copy_up() keeps a plain copy of c->dentry->d_name in c->destname, and ovl_copy_up_start() only keeps ovl_rename() away. When a lookup finds the same directory under another name after a change to the lower layer, d_splice_alias() moves the dentry and frees its external name.
With a delay in ovl_do_copy_up(), a chmod of a lower-only directory with a 60 byte name raced with a rename of that directory in the lower layer and a stat of the new name, and KASAN reported a use-after-free in lookup_noperm_common().
Fix this by using take_dentry_name_snapshot() for c->destname.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability identified within the Linux kernel's overlay filesystem (ovl) subsystem represents a critical race condition involving memory management during directory copy-up operations. This flaw specifically manifests when the system attempts to replicate metadata or data from a lower, read-only layer of an overlay mount to an upper, writable layer. The core technical issue stems from improper handling of dentry name pointers during concurrent filesystem operations. In Linux VFS (Virtual File System), a pointer to the string stored in a dentry's name field is only guaranteed to remain valid as long as there are active references preventing that specific dentry from being moved or unlinked by other threads. The overlay filesystem implementation relied on keeping a plain copy of the directory name in a local variable during the copy-up process, assuming this snapshot would persist safely until it was needed for subsequent operations.
The operational failure occurs due to a race condition between different kernel threads interacting with the same inode and dentry structures. Specifically, when ovl_do_copy_up is executed, it captures the current directory name into c->destname. However, if another thread performs a lookup that finds the same directory under a new name after changes in the lower layer, the function d_splice_alias may be invoked to splice this alias into the cache. This action effectively moves the underlying dentry structure and frees its external name buffer because the original reference is no longer needed or has been superseded by the spliced version. If ovl_do_copy_up experiences any delay between capturing the pointer and using it, it proceeds to access memory that has already been freed by the concurrent rename operation. This scenario was observed in testing where a chmod operation on a lower-only directory with a name of approximately sixty bytes raced against a simultaneous rename of that same directory in the lower layer, leading directly to a use-after-free condition detected by Kernel Address Sanitizer (KASAN) within lookup_noperm_common().
From a security and stability perspective, this vulnerability allows for potential denial-of-service conditions through kernel panics or crashes. More critically, use-after-free vulnerabilities are historically among the most dangerous classes of memory safety errors because they can potentially be exploited to achieve arbitrary code execution with kernel privileges if an attacker can control the contents written into the freed memory region before it is reallocated for a different purpose. Although this specific instance was triggered by local filesystem operations like chmod and rename, which typically require some level of access to the affected directory structure, the underlying flaw in how reference counts and name snapshots are managed poses a significant risk to system integrity. The lack of proper synchronization or snapshotting mechanisms means that any concurrent modification to dentry names can corrupt kernel memory state, leading to unpredictable behavior ranging from data corruption to complete system instability.
To mitigate this vulnerability, the Linux kernel maintainers implemented a fix by replacing the manual copying of the directory name with the use of take_dentry_name_snapshot(). This function is designed specifically to handle the complexities of dentry naming in concurrent environments. It ensures that the snapshot taken remains valid and protected from being freed while it is still in use by taking appropriate references or utilizing internal kernel mechanisms that guarantee memory safety during these transitions. System administrators should ensure their systems are updated with patches containing this fix, as running unpatched kernels exposes them to potential instability when performing concurrent file system operations on overlay mounts. Additionally, developers working with VFS extensions must adhere strictly to the guidelines for dentry name handling, ensuring that any captured names are protected using standard snapshotting APIs rather than simple pointer copies or manual memory management during race-prone sequences like copy-up and rename operations. This aligns with broader industry standards such as CWE-416 (Use After Free) and relates to ATT&CK techniques involving exploitation of software vulnerabilities for privilege escalation or service disruption, emphasizing the importance of robust synchronization primitives in kernel-level file system drivers.