KernelScan.io

HIGH Introduced in 5.19

ext4 Symlink UAF

CVE-2026-99174

CVSS 7.1 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: ext4: free the sbi after a grace period ext4_get_link() follows a symlink that keeps its target in a data block in rcu pathwalk mode with ext4_getblk(EXT4_GET_BLOCKS_CACHED_NOWAIT). That reads s_mount_state in the ASSERT() of ext4_getblk() and again in ext4_es_lookup_extent(), and the lookup bumps the extent status hit or miss counter, all through sb->s_fs_info. ext4_put_super() destroys those counters, clears sb->s_fs_info and frees the sbi without waiting for a grace period. A pathwalk that is still in ext4_get_link() when the last reference to the mount goes away then dereferences a NULL s_fs_info, the freed sbi or the destroyed percpu counters. With a pathwalk held up in ext4_get_link() while the last reference goes away: KASAN: null-ptr-deref in range [0x00000000000000a8-0x00000000000000af] RIP: 0010:ext4_getblk+0xf0/0x640 Call Trace: <TASK> ext4_get_link+0x26c/0x410 pick_link+0xf96/0x1780 step_into_slowpath+0x9b8/0x1250 path_lookupat+0x484/0xb00 filename_lookup+0x1f1/0x5b0 vfs_statx+0xd7/0x3b0 vfs_fstatat+0x4d/0x90 __do_sys_newfstatat+0xa0/0x100 do_syscall_64+0x10e/0x5e0 entry_SYSCALL_64_after_hwframe+0x77/0x7f So far that has been hard to hit. umount(2) waits for a grace period in namespace_unlock() before it drops the mount, so only a mount whose last reference goes away elsewhere, like the close of a file or a chdir out of a lazily unmounted directory, can race a walker. Keep sb->s_fs_info and free the sbi together with the extent status counters after a grace period. Split the counters out of ext4_es_unregister_shrinker() for that. The shrinker still gets wasted in ext4_put_super(), the counters go with the sbi.

02

Engine v0.9.0

Risk summary

A local unprivileged user with access to an ext4 filesystem can trigger a use-after-free by racing a pathwalk on a symlink against the teardown of the mount (via lazy unmount followed by file close or chdir). This leads to kernel memory corruption, potential privilege escalation, and kernel panic.

Affectedfs/ext4/super.c (ext4 filesystem)

Vulnerability analysis

The ext4 filesystem's superblock info (sbi) structure and its percpu extent-status counters were freed immediately in ext4_put_super() without waiting for an RCU grace period. Meanwhile, ext4_get_link() can run in RCU pathwalk mode while resolving a symlink whose target lives in an external data block; it reads s_mount_state and bumps the extent-status hit/miss counters through the sbi pointer. If the last reference to the mount disappears (not via umount, which waits for a grace period, but via a file close or chdir out of a lazily unmounted directory), a concurrent pathwalk can dereference the already-freed sbi, a NULL s_fs_info, or destroyed percpu counters, causing a KASAN-reported null-pointer dereference and kernel oops. The fix adds an rcu_head to the sbi, splits counter destruction into a separate function, and defers both the counter teardown and the sbi free to an RCU callback so that any in-flight RCU pathwalk completes before the memory is reclaimed.

03

BranchIntroducedFixed inPatch commit
6.15.196.1.191cf3bd5824c98
6.125.196.12.1154ce0e27ea610
6.185.196.18.5980d5db1686b0
6.65.196.6.161b4b0598fad51
7.25.197.2.1387d29b8b8497
mainline5.197.3c17b44266a1f
cip/6.125.196.12.117-cip354ce0e27ea610

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)