HIGH Introduced in 2.6.16
configfs SymlinkTarget UAF
CVE-2026-97950
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: configfs: pin the symlink target's dirent instead of chasing ->ci_dentry create_link() reads the target's configfs_dirent from item->ci_dentry->d_fsdata, relying on the item reference taken by get_target(). That reference pins the item, not its dentry: the dentry is pinned by DCACHE_PERSISTENT, which configfs_remove_dir() releases via simple_rmdir() while the item is still alive. A symlink racing with rmdir of its target can therefore find ->ci_dentry freed and its dirent released, triggering WARN_ON(!atomic_read(&sd->s_count)) in configfs_get(). Take the dirent in get_target() as well, under ->d_lock and atomically with the item reference, and pass it down to create_link(). A hashed dentry has not been killed yet, so its ->d_fsdata reference keeps the dirent alive there.
02KernelScan AI Analysis
Risk summary
A local attacker who can issue symlink and rmdir operations on a mounted configfs filesystem can exploit a race condition to trigger a use-after-free on internal kernel data structures. This can lead to kernel memory corruption, potentially enabling arbitrary read/write access or denial of service via kernel panic. Systems that use configfs (e.g., USB gadget configuration, OCFS2 cluster stacks) and expose local access are at risk.
Vulnerability analysis
A race between creating a symlink and removing its target directory in configfs can trigger a use-after-free. The symlink operation held a reference to the target object but not to its underlying directory record, so a concurrent removal could free that record while the symlink code was still reading from it. The corrected code now holds a reference to the directory record for the entire symlink operation, preventing premature freeing. This can be triggered locally by any account that can create symlinks and remove directories in a mounted configfs filesystem.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 2.6.16 | 6.12.112 | 846ff40fd57a |
| 6.18 | 2.6.16 | 6.18.53 | 4f54beb2e7f6 |
| 6.6 | 2.6.16 | 6.6.160 | a44744454eaf |
| 7.2 | 2.6.16 | 7.2.7 | d47c5de1cd6b |
| mainline | 2.6.16 | 7.3 | a7c1290eef60 |
| cip/6.12 | 2.6.16 | 6.12.112-cip33 | 846ff40fd57a |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |