CVE-2026-98985: namespace: check the mounts before reading their parents in pivot_root()

Published Oct 23, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

namespace: check the mounts before reading their parents in pivotroot()

pathpivotroot() reads the parents of newroot 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 namespacesem is held. That's fine for a mount that is in the caller's mount namespace.

But newroot 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 mountlock alone and frees the parent afterwards:

pivotroot() close(fd), last ref on the parent ------------ --------------------------------- exparent = newmnt->mntparent mntputnoexpireslowpath() umountmnt(newmnt) cleanupmnt() callrcu() ISMNTSHARED(exparent)

BUG: KASAN: slab-use-after-free in pathpivotroot+0xf1a/0x1840 Read of size 4 at addr ffff8881047382f8 by task pivotwiden/157 pathpivotroot+0xf1a/0x1840 x64syspivotroot+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 mountlock") fixed for statmount().

Check that both mounts are in the caller's namespace before their parents are read. Every path returns EINVAL either way.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In path_pivot_root(), check that both the new_root mount and the caller's root mount are in the caller's mount namespace before reading their parent mounts; return EINVAL when either mount is not in that namespace.

Event History

Oct 23, 2026
CVE Published
via MITRE·12:20 PM
Data Sourced
via MITRE·12:20 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203