Description
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.
Published: 2026-10-23
Score: n/a
EPSS: n/a
KEV: No
Impact: Kernel Crash / Potential Privilege Escalation
Action: Apply Patch
AI Analysis

Impact

The vulnerability arises in the handling of the pivot_root system call within the Linux kernel. A use‑after‑free occurs when the kernel reads the parent mounts of a new_root or the caller’s root before verifying that those mounts belong to the caller’s mount namespace. If a mount is unmounted but still referenced by a file descriptor, the parent may be freed and the subsequent read of freed memory triggers a KASAN error. The erroneous memory read fulfills the error path and returns EINVAL, but the underlying memory corruption can lead to a kernel crash or arbitrary kernel memory corruption that an attacker might exploit to gain elevated privileges.

Affected Systems

The flaw is present in all releases of the Linux kernel that predates the fix in commit bb4609405752. No specific version range is currently listed, so any running kernel that has not incorporated that commit is potentially affected. Systems that rely on the pivot_root or chroot mechanisms while manipulating mounts are the most directly exposed; typical affected environments include containers, initramfs setups, and systems performing rootfs upgrades.

Risk and Exploitability

The CNAs do not list the vulnerability in the CISA KEV catalog, and the Exploit Prediction Scoring System does not provide a current score, leaving the exact exploitation likelihood uncertain. However, the presence of a use‑after‑free in a privileged kernel function and the lack of an immediate error return suggest that an attacker with local root or sufficient kernel access could potentially trigger memory corruption to crash the kernel or execute arbitrary code. The likely attack vector involves constructing a mount that is unmounted while still referenced by a file descriptor and then invoking pivot_root or chroot with that descriptor. Although the default behavior returns EINVAL, the memory corruption path remains present and could be leveraged by a sophisticated attacker.

Generated by OpenCVE AI on October 23, 2026 at 14:52 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes commit bb4609405752 or any later release that merged the patch.
  • If an update is not immediately possible, avoid using pivot_root or chroot with file descriptors that may refer to mounts that could be temporarily unmounted; ensure mounts are fully mounted and not unmounted during the call.
  • Monitor system logs for KASAN or kernel panic messages and consider enabling kernel address sanitizer or a watchdog to detect and reboot after uncorrectable errors.
  • Apply the patch from the kernel repository manually by cherry‑picking commit bb4609405752 from https://git.kernel.org.

Generated by OpenCVE AI on October 23, 2026 at 14:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 15:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 23 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
Description 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.
Title namespace: check the mounts before reading their parents in pivot_root()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-23T12:20:03.622Z

Reserved: 2026-09-25T10:25:14.384Z

Link: CVE-2026-98985

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T13:17:20.420

Modified: 2026-10-23T13:17:20.420

Link: CVE-2026-98985

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T15:00:13Z

Weaknesses