dcache: don't put a mountpoint on a dentry that's being removed
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 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.
CVE-2026-98984
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98984
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "1064f874abc0d05eeed8993815f584d847b72486",
"lessThan": "5e6bfd9f249f2c74bb63c0f06ad959da3bee0971",
"versionType": "git"
},
{
"status": "affected",
"version": "1064f874abc0d05eeed8993815f584d847b72486",
"lessThan": "793cb67b0f52d00c67bd0e76bc57455b5c70ebb8",
"versionType": "git"
},
{
"status": "affected",
"version": "1064f874abc0d05eeed8993815f584d847b72486",
"lessThan": "390ddcea2a8aca411b931a8e2863a80ccca8d2b3",
"versionType": "git"
},
{
"status": "affected",
"version": "1064f874abc0d05eeed8993815f584d847b72486",
"lessThan": "30a1625022411a387cce9239408ece9955bc9c58",
"versionType": "git"
},
{
"status": "affected",
"version": "1064f874abc0d05eeed8993815f584d847b72486",
"lessThan": "75f4197f1e11d2eb75c2d6f916a7d4764db621e5",
"versionType": "git"
},
{
"status": "affected",
"version": "5e6ef5ef6eaf690faad3a7c6c665ebf45d7b6ccf",
"versionType": "git"
},
{
"status": "affected",
"version": "839d42687dfce0ed0ea2c6bd8d707cc0e276fbe7",
"versionType": "git"
},
{
"status": "affected",
"version": "808e83e5add13152bd4a88346487de68395c136b",
"versionType": "git"
},
{
"status": "affected",
"version": "6de9d08a9718ee9c12ba6343c50141c2d633e3dc",
"versionType": "git"
},
{
"status": "affected",
"version": "4.1.40",
"lessThan": "4.2",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.4.54",
"lessThan": "4.5",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.9.15",
"lessThan": "4.10",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.10.3",
"lessThan": "4.11",
"versionType": "semver"
}
],
"programFiles": [
"fs/dcache.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "4.11"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "4.11",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.6.160",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.113",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.57",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.11",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"fs/dcache.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98984
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #52833 · Revision 1
- Added to Heist Feed
- Publisher date