Skip to main content
Vulnerability Database/CVE-2026-97949

CVE-2026-97949: Linux Kernel Use-After-Free Vulnerability

CVE-2026-97949 is a use-after-free flaw in the Linux kernel configfs subsystem that can lead to memory corruption. This article covers the technical details, affected versions, security impact, and mitigation strategies.

Published:

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-97949 Overview

CVE-2026-97949 is a use-after-free vulnerability in the Linux kernel's configfs subsystem. The flaw lives in the interaction between configfs_rmdir() and configfs_symlink(). A hashed dentry is treated as proof that sd->s_element references a live config_item, but simple_rmdir() leaves the dentry hashed after the last item reference is dropped. A concurrent configfs_symlink() call can resolve the target through get_target() in that window and access freed memory. KASAN reports a slab-use-after-free in config_item_get() reachable from get_target() in fs/configfs/symlink.c.

Critical Impact

Local attackers with permission to create configfs symlinks can trigger a race condition that dereferences a freed config_item, enabling kernel memory corruption or denial of service.

Affected Products

  • Linux kernel (upstream configfs subsystem)
  • Stable kernel branches receiving the backported fixes referenced below
  • Distributions shipping affected kernels prior to the patch commits

Discovery Timeline

  • 2026-09-25 - CVE-2026-97949 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97949

Vulnerability Analysis

The configfs pseudo-filesystem exposes kernel objects as directories and files. configfs_get_config_item() uses a hashed dentry as an invariant: if the dentry is hashed, the attached s_element is a live config_item. The removal path violates this invariant. configfs_rmdir() calls into simple_rmdir(), which does not unhash the dentry. The last reference to the backing config_item is dropped immediately after, and the dentry is only unhashed later by d_delete() once ->rmdir() returns.

During this window, the dentry remains hashed while the underlying config_item has been freed. configfs_symlink() resolves its target without holding a lock on it, so get_target() can observe the stale hashed dentry and call config_item_get() on freed memory. KASAN flags this as a slab-use-after-free in config_item_get+0x26/0x90.

Root Cause

The root cause is an ordering bug between dentry unhashing and item teardown in configfs_rmdir(). Downstream code relies on the "hashed implies live" invariant, but the removal path breaks it. The fix unhashes the dentry inside configfs_remove_dir() while the item is still guaranteed to exist. A reference obtained just before the unhash remains harmless because create_link() rechecks CONFIGFS_USET_DROPPING, which configfs_detach_prep() has already set.

Attack Vector

Exploitation requires local access and permission to operate on a mounted configfs instance. An attacker races rmdir on a config item directory against symlink creation targeting the same item. Winning the race causes get_target() to touch a freed config_item, producing memory corruption or a kernel panic. See the upstream fixes in Kernel Git Commit 5d7cbfb, Kernel Git Commit 925d856, and Kernel Git Commit f06c2d2 for the exact code change.

No public proof-of-concept exploit code is referenced in the NVD entry. The vulnerability pattern is a classic kernel race leading to use-after-free [CWE-416].

Detection Methods for CVE-2026-97949

Indicators of Compromise

  • KASAN kernel log entries citing slab-use-after-free in config_item_get reachable from get_target and configfs_symlink.
  • Unexpected kernel oops or panic traces originating in fs/configfs/symlink.c or fs/configfs/dir.c.
  • Repeated concurrent rmdir and symlink operations against the same configfs paths by unprivileged processes.

Detection Strategies

  • Enable KASAN on test and canary kernels to surface the use-after-free during fuzzing or stress testing of configfs.
  • Audit kernel ring buffer and journald for crash signatures that reference config_item_get, get_target, or configfs_symlink.
  • Correlate kernel crashes with process ancestry to identify local accounts repeatedly interacting with configfs mount points.

Monitoring Recommendations

  • Forward dmesg and /var/log/kern.log to a centralized log pipeline and alert on KASAN or BUG traces.
  • Monitor filesystem syscalls (symlinkat, unlinkat, rmdir) targeting paths under /sys/kernel/config using eBPF or auditd.
  • Track kernel version inventory across the fleet to prioritize hosts still running pre-patch builds.

How to Mitigate CVE-2026-97949

Immediate Actions Required

  • Apply the upstream configfs fix that unhashes the dentry in configfs_remove_dir() before the item reference is dropped.
  • Rebuild and deploy kernels incorporating commits 5d7cbfb, 925d856, and f06c2d2, or install vendor kernel updates that backport them.
  • Restrict access to configfs mount points to trusted administrative users where feasible.

Patch Information

The fix is distributed across three upstream commits: Kernel Git Commit 5d7cbfb, Kernel Git Commit 925d856, and Kernel Git Commit f06c2d2. The change moves the dentry unhash into configfs_remove_dir() so the "hashed implies live" invariant holds across the removal path. Track your distribution's stable kernel announcements for the corresponding package versions.

Workarounds

  • Unmount configfs on systems that do not require it, or ensure the filesystem is not exposed to unprivileged users.
  • Tighten DAC permissions on /sys/kernel/config and child directories to limit who can issue symlink and rmdir operations.
  • Disable or unload kernel modules that register user-reachable configfs subsystems if the functionality is not needed.
bash
# Verify running kernel and configfs exposure
uname -r
mount | grep configfs
# Restrict access to configfs root (adjust to local policy)
chmod 700 /sys/kernel/config

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.