HIGH Introduced in 4.1
namespace PivotRoot UAF
CVE-2026-98985
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: namespace: check the mounts before reading their parents in pivot_root() path_pivot_root() reads the parents of new_root and of the caller's root and checks whether they are shared before it checks that either mount is in the caller's mount namespace. Only namespace_sem is held. That's fine for a mount that is in the caller's mount namespace. But new_root can be a file descriptor to a mount that has been unmounted and that only the file descriptor keeps alive. If that mount stayed attached to its parent when it was unmounted nothing pins the parent for it. The final mntput() of the parent unhooks the children under mount_lock alone and frees the parent afterwards: pivot_root() close(fd), last ref on the parent ------------ --------------------------------- ex_parent = new_mnt->mnt_parent mntput_no_expire_slowpath() __umount_mnt(new_mnt) cleanup_mnt() call_rcu() IS_MNT_SHARED(ex_parent) BUG: KASAN: slab-use-after-free in path_pivot_root+0xf1a/0x1840 Read of size 4 at addr ffff8881047382f8 by task pivot_widen/157 path_pivot_root+0xf1a/0x1840 __x64_sys_pivot_root+0x165/0x190 The same goes for the caller's root via chroot(). Both outcomes of the check end in EINVAL so nothing but the read itself goes wrong. It's the same thing commit bb4609405752 ("statmount: read the parent of an unmounted mount under mount_lock") fixed for statmount(). Check that both mounts are in the caller's namespace before their parents are read. Every path returns EINVAL either way.
02KernelScan AI Analysis
Risk summary
A local unprivileged user can trigger a use-after-free in the pivot_root system call by racing with the unmount of a parent mount, potentially leading to kernel memory corruption and privilege escalation. The bug is reachable from any process that can call pivot_root (CAP_SYS_ADMIN in a user namespace) and requires winning a narrow race window.
Vulnerability analysis
The pivot_root system call reads the parent pointers of the new_root and current root mounts to check whether they are shared, but it performs this check before verifying that both mounts belong to the caller's mount namespace. A mount that has been unmounted but is kept alive only by an open file descriptor no longer has its parent pinned; the parent can be freed concurrently by the final mntput() running under mount_lock. If the parent is freed after pivot_root reads the pointer but before it checks the shared flag, a use-after-free read occurs. The fix moves the namespace membership check earlier so that unmounted mounts are rejected before their parent pointers are dereferenced, eliminating the race.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 4.0 | 4.0.2 | 4.1 | 43fd2e2ec66e |
| 5.10 | 4.1 | 5.10.273 | 5b5f8d0895cf |
| 5.15 | 4.1 | 5.15.224 | 3184a2fda996 |
| 6.1 | 4.1 | 6.1.191 | a56d4f8f8f4c |
| 6.12 | 4.1 | 6.12.114 | e3aba6900483 |
| 6.18 | 4.1 | 6.18.57 | 3dad2330c893 |
| 6.6 | 4.1 | 6.6.160 | 3c2441e21c3d |
| 7.2 | 4.1 | 7.2.11 | 6b7c001eb585 |
| mainline | 4.1 | 7.3 | — |
| cip/6.12 | 4.1 | 6.12.114-cip34 | 3c2441e21c3d |
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.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| 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.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| 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) |