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

Summary

CVECVE-2026-98984
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-23 13:17:20 UTC
Updated2026-10-23 13:17:20 UTC
DescriptionIn 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 dont_mount() on the victim and then detach_mounts() with the victim's inode locked. do_lock_mount() takes the inode lock of the mountpoint and checks cant_mount() so a mount can't show up after detach_mounts(). But attach_recursive_mnt() 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 d_set_mounted() only refuses a dentry that is unlinked. Between detach_mounts() and d_delete() the victim is still hashed: rmrace: b passed dont_mount() and detach_mounts(), sleeping T2: move_mount(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 cant_mount() in d_set_mounted() as well. dont_mount() raises the flag under d_lock before detach_mounts() runs so either the mountpoint is set first and detach_mounts() finds the mount or the flag is seen and the mount is refused.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 1064f874abc0d05eeed8993815f584d847b72486 5e6bfd9f249f2c74bb63c0f06ad959da3bee0971 git Not specified
CNA Linux Linux affected 1064f874abc0d05eeed8993815f584d847b72486 793cb67b0f52d00c67bd0e76bc57455b5c70ebb8 git Not specified
CNA Linux Linux affected 1064f874abc0d05eeed8993815f584d847b72486 390ddcea2a8aca411b931a8e2863a80ccca8d2b3 git Not specified
CNA Linux Linux affected 1064f874abc0d05eeed8993815f584d847b72486 30a1625022411a387cce9239408ece9955bc9c58 git Not specified
CNA Linux Linux affected 1064f874abc0d05eeed8993815f584d847b72486 75f4197f1e11d2eb75c2d6f916a7d4764db621e5 git Not specified
CNA Linux Linux affected 5e6ef5ef6eaf690faad3a7c6c665ebf45d7b6ccf git Not specified
CNA Linux Linux affected 839d42687dfce0ed0ea2c6bd8d707cc0e276fbe7 git Not specified
CNA Linux Linux affected 808e83e5add13152bd4a88346487de68395c136b git Not specified
CNA Linux Linux affected 6de9d08a9718ee9c12ba6343c50141c2d633e3dc git Not specified
CNA Linux Linux affected 4.1.40 4.2 semver Not specified
CNA Linux Linux affected 4.4.54 4.5 semver Not specified
CNA Linux Linux affected 4.9.15 4.10 semver Not specified
CNA Linux Linux affected 4.10.3 4.11 semver Not specified
CNA Linux Linux affected 4.11 Not specified
CNA Linux Linux unaffected 4.11 semver Not specified
CNA Linux Linux unaffected 6.6.160 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.113 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.57 6.18.* semver Not specified
CNA Linux Linux unaffected 7.2.11 7.2.* semver Not specified
CNA Linux Linux unaffected 7.3 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/75f4197f1e11d2eb75c2d6f916a7d4764db621e5 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/5e6bfd9f249f2c74bb63c0f06ad959da3bee0971 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/390ddcea2a8aca411b931a8e2863a80ccca8d2b3 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/30a1625022411a387cce9239408ece9955bc9c58 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/793cb67b0f52d00c67bd0e76bc57455b5c70ebb8 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report