CVE-2026-98984: dcache: don't put a mountpoint on a dentry that's being removed

Published Oct 23, 2026
·
Updated

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

dcache: don't put a mountpoint on a dentry that's being removed

rmdir(), unlink() and rename() call dontmount() on the victim and then detachmounts() with the victim's inode locked. dolockmount() takes the inode lock of the mountpoint and checks cantmount() so a mount can't show up after detachmounts().

But attachrecursivemnt() makes a second mountpoint for the root of the source mount so that the mounts already located at the destination can be put on top of it. No inode is locked for that one and dsetmounted() only refuses a dentry that is unlinked. Between detachmounts() and ddelete() the victim is still hashed:

rmrace: b passed dontmount() and detachmounts(), sleeping T2: movemount(S, /tmp/plcant/x, BENEATH) = 0 errno 0 () T1: rmdir(/tmp/plcant/d/b) = 0 errno 0 109 107 0:61 /d/b//deleted /tmp/plcant/x rw,relatime - tmpfs tmpfs rw 108 109 0:63 / /tmp/plcant/x rw,relatime - tmpfs T rw

A bind mount of the directory that's being removed is moved beneath an existing mount while the rmdir() is located between the two calls. The mount ends up on the removed directory and nothing will ever detach it.

Check cantmount() in dsetmounted() as well. dontmount() raises the flag under dlock before detachmounts() runs so either the mountpoint is set first and detachmounts() finds the mount or the flag is seen and the mount is refused.

Affected Software

1 affected component
Linux Linux kernel

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