Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97594 Overview
CVE-2026-97594 is a use-after-free vulnerability in the Linux kernel's Landlock Linux Security Module. The flaw resides in current_check_refer_path(), which reads old_dentry->d_parent without holding a reference or lock on the parent directory. A concurrent rename(2) can reparent the source dentry while security_path_link() executes, allowing the former parent to be freed while the Landlock hook still walks it. The vulnerability is reachable by any local process operating inside a Landlock domain that handles at least one filesystem access right.
Critical Impact
A local unprivileged attacker can trigger kernel memory corruption by racing linkat(2) against rename(2) and rmdir(2), potentially leading to privilege escalation or kernel information disclosure.
Affected Products
- Linux kernel versions containing the Landlock LSM with the vulnerable current_check_refer_path() implementation
- Distributions shipping affected upstream kernels prior to the backport fixes referenced in the stable tree
- Systems where Landlock sandboxing is enabled and used by applications
Discovery Timeline
- 2026-09-25 - CVE-2026-97594 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97594
Vulnerability Analysis
The vulnerability is a [Use After Free] in the Landlock LSM path linking hook. Landlock enforces filesystem access policy through hooks invoked during security-relevant syscalls. When linkat(2) is called, filename_linkat() holds a reference on the source dentry but neither locks nor references the source's parent directory. The Landlock hook hook_path_link() then calls current_check_refer_path(), which dereferences old_dentry->d_parent inside collect_domain_accesses() and in audit record emission.
KASAN reports the condition as a slab-use-after-free read at collect_domain_accesses+0x278/0x290, with the parent inode freed via i_callback() under RCU after the dentry was removed. The rename hook hook_path_rename() is not affected because lock_rename() is called before the hook runs, preventing concurrent reparenting of the source.
Root Cause
A reference on a child dentry does not pin its parent. The function __d_move() reassigns dentry->d_parent and drops the reference the child held on its former parent. Consequently, when current_check_refer_path() dereferences old_dentry->d_parent without synchronization, a concurrent rename can detach the parent, and a subsequent rmdir(2) plus RCU grace period can free it before the Landlock hook finishes walking the hierarchy.
Attack Vector
Exploitation requires local code execution inside a Landlock domain that handles at least one filesystem access right. The attacker races three operations: a tight linkat(2) loop on a target source path, rename(2) to reparent the source, and rmdir(2) to free the former parent directory. When timing aligns, the Landlock hook dereferences freed slab memory, enabling kernel memory corruption primitives typical of use-after-free bugs. See the upstream fix commits 2c6dc79, 379efd2, and ba29c46 for technical details.
Detection Methods for CVE-2026-97594
Indicators of Compromise
- KASAN slab-use-after-free reports referencing collect_domain_accesses or current_check_refer_path in kernel logs
- Unexpected kernel oops or panic traces originating from security_path_link → current_check_refer_path
- Processes within a Landlock domain generating sustained high-frequency linkat, rename, and rmdir syscall patterns on the same path
Detection Strategies
- Enable KASAN on test and canary kernels to surface the use-after-free during fuzzing or production triage
- Collect kernel ring buffer output and kdump crashes for stack traces matching the vulnerable call chain
- Monitor auditd for anomalous Landlock-sandboxed workloads that invoke linkat at rates inconsistent with normal application behavior
Monitoring Recommendations
- Centralize kernel logs and search for BUG: KASAN entries referencing Landlock symbols
- Alert on repeated kernel oops events on hosts running sandboxed workloads such as container runtimes, browsers, or systemd services using Landlock
- Baseline syscall rates per workload and flag deviations consistent with race-condition exploitation attempts
How to Mitigate CVE-2026-97594
Immediate Actions Required
- Apply the stable kernel updates containing the upstream fix commits as soon as they are available from your distribution
- Inventory applications and services that create Landlock domains and prioritize patching those hosts
- Restrict local shell access on multi-tenant systems until the fix is deployed
Patch Information
The fix takes a reference on the source parent dentry using dget() for the common-mount-root case and dget_parent() otherwise, releasing it after the hierarchy walk and synchronous audit logging. The upstream commits are 2c6dc79, 379efd2, and ba29c46. Deploy vendor-supplied kernels that include these backports.
Workarounds
- Disable Landlock on affected kernels where sandboxing is not operationally required, by booting with lsm= parameters that omit Landlock
- Avoid granting local account access to untrusted users on systems running sandboxed workloads built on Landlock
- Where feasible, run workloads that create Landlock domains inside separate virtual machines to contain any kernel compromise
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

