{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39927","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.147Z","datePublished":"2025-10-01T08:07:14.595Z","dateUpdated":"2026-08-05T12:06:06.246Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:06:06.246Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix race condition validating r_parent before applying state\n\nAdd validation to ensure the cached parent directory inode matches the\ndirectory info in MDS replies. This prevents client-side race conditions\nwhere concurrent operations (e.g. rename) cause r_parent to become stale\nbetween request initiation and reply processing, which could lead to\napplying state changes to incorrect directory inodes.\n\n[ idryomov: folded a kerneldoc fixup and a follow-up fix from Alex to\n  move CEPH_CAP_PIN reference when r_parent is updated:\n\n  When the parent directory lock is not held, req->r_parent can become\n  stale and is updated to point to the correct inode.  However, the\n  associated CEPH_CAP_PIN reference was not being adjusted.  The\n  CEPH_CAP_PIN is a reference on an inode that is tracked for\n  accounting purposes.  Moving this pin is important to keep the\n  accounting balanced. When the pin was not moved from the old parent\n  to the new one, it created two problems: The reference on the old,\n  stale parent was never released, causing a reference leak.\n  A reference for the new parent was never acquired, creating the risk\n  of a reference underflow later in ceph_mdsc_release_request().  This\n  patch corrects the logic by releasing the pin from the old parent and\n  acquiring it for the new parent when r_parent is switched.  This\n  ensures reference accounting stays balanced. ]"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The race is created entirely by concurrent local syscalls (path lookup driving `ceph_d_revalidate()` and `rename()`) on a mounted CephFS; no network-facing listener is involved, as the kernel here is the client consuming replies from its trusted MDS.\nAC:L - The attacker controls both sides of the race — one thread forces LOOKUP requests via lease-expired path walks, another repeatedly renames the target dentry between directories — and can retry indefinitely with no cost or side effects until the window is hit.\nPR:L - Only an unprivileged local account with access to the CephFS mount is needed; `ceph_d_revalidate()` sets `r_parent` without `CEPH_MDS_R_PARENT_LOCKED` on every ordinary path walk, and `rename()` within the attacker's own directories suffices to win the race.\nUI:N - The attacker's own two threads supply both the request and the concurrent rename; no action by any other user or administrator is required beyond the CephFS mount already existing.\nS:U - The corruption is confined to the kernel's own inode/cap/dcache state within the same security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - `ceph_fill_inode()` copies the foreign directory's mode, uid/gid, nlink, size, times, and its entire xattr blob (including security labels) onto an inode the attacker can then `stat`/`getxattr`, and the phantom caps installed by `ceph_add_cap()` make the client serve that stolen metadata indefinitely without revalidation.\nI:H - Ownership and permission bits of a directory inode are overwritten with another directory's values (e.g. an attacker-owned 0777 mode landing on a root-owned 0700 directory), and cap ids, snaprealm membership, and the dir-complete/empty flag are all corrupted, subverting the client's permission and consistency model.\nA:H - The cap id written by `ceph_add_cap()` no longer matches what the MDS issued for that inode, so cap flushes are rejected and threads block indefinitely on `i_cap_wq` (fsync/sync/umount hangs), while wrongly setting dir-complete with `i_size_write(inode, 0)` makes a live directory's entries unreachable for all users on the client."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/debugfs.c","fs/ceph/dir.c","fs/ceph/file.c","fs/ceph/inode.c","fs/ceph/mds_client.c","fs/ceph/mds_client.h"],"versions":[{"version":"9030aaf9bf0a1eee47a154c316c789e959638b0f","lessThan":"db378e6f83ec705c6091c65d482d555edc2b0a72","status":"affected","versionType":"git"},{"version":"9030aaf9bf0a1eee47a154c316c789e959638b0f","lessThan":"2bfe45987eb346e299d9f763f9cd05f77011519f","status":"affected","versionType":"git"},{"version":"9030aaf9bf0a1eee47a154c316c789e959638b0f","lessThan":"15f519e9f883b316d86e2bb6b767a023aafd9d83","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/debugfs.c","fs/ceph/dir.c","fs/ceph/file.c","fs/ceph/inode.c","fs/ceph/mds_client.c","fs/ceph/mds_client.h"],"versions":[{"version":"2.6.34","status":"affected"},{"version":"0","lessThan":"2.6.34","status":"unaffected","versionType":"semver"},{"version":"6.12.48","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.8","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.34","versionEndExcluding":"6.12.48"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.34","versionEndExcluding":"6.16.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.34","versionEndExcluding":"6.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/db378e6f83ec705c6091c65d482d555edc2b0a72"},{"url":"https://git.kernel.org/stable/c/2bfe45987eb346e299d9f763f9cd05f77011519f"},{"url":"https://git.kernel.org/stable/c/15f519e9f883b316d86e2bb6b767a023aafd9d83"}],"title":"ceph: fix race condition validating r_parent before applying state","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":4.7,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"HIGH","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-39927","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-01-14T17:39:17.680672Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-362","description":"CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-01-14T17:42:45.563Z"}}]}}