CVE-2025-39927: ceph: fix race condition validating r_parent before applying state
In the Linux kernel, the following vulnerability has been resolved:
ceph: fix race condition validating r_parent before applying state
Add validation to ensure the cached parent directory inode matches the
directory info in MDS replies. This prevents client-side race conditions
where concurrent operations (e.g. rename) cause r_parent to become stale
between request initiation and reply processing, which could lead to
applying state changes to incorrect directory inodes.
[ idryomov: folded a kerneldoc fixup and a follow-up fix from Alex to
move CEPH_CAP_PIN reference when r_parent is updated:
When the parent directory lock is not held, req->r_parent can become
stale and is updated to point to the correct inode. However, the
associated CEPH_CAP_PIN reference was not being adjusted. The
CEPH_CAP_PIN is a reference on an inode that is tracked for
accounting purposes. Moving this pin is important to keep the
accounting balanced. When the pin was not moved from the old parent
to the new one, it created two problems: The reference on the old,
stale parent was never released, causing a reference leak.
A reference for the new parent was never acquired, creating the risk
of a reference underflow later in ceph_mdsc_release_request(). This
patch corrects the logic by releasing the pin from the old parent and
acquiring it for the new parent when r_parent is switched. This
ensures reference accounting stays balanced. ]
Security readout for executives and security teams
Plain-English summary
A race condition in Linux’s Ceph filesystem client can make concurrent operations use an outdated parent directory record. The kernel may then update the wrong directory object, with potential confidentiality, integrity, and availability consequences. Exposure is limited to systems using the affected Ceph client code, but the supplied version metadata is insufficiently precise for fleet-wide conclusions.
Executive priority
Treat this as a high-priority kernel maintenance issue for CephFS client fleets, especially shared or sensitive systems. It is not evidence of an Internet-wide emergency because access is local and active exploitation is unsupported. Require rapid exposure inventory, vendor version confirmation, and deployment of corrected kernels through normal change controls.
Technical view
The Ceph client’s request parent, r_parent, could become stale before an MDS reply was processed. State could consequently be applied to an incorrect directory inode. Updating r_parent without transferring its CEPH_CAP_PIN also caused a leaked reference on the old parent and possible reference underflow when releasing the request. The referenced stable commits add validation and balance pin accounting.
Likely exposure
Likely candidates are Linux hosts mounting CephFS through the in-kernel Ceph client, particularly where concurrent rename or related directory operations occur. The bundle names versions 2.6.34, 6.12.48, 6.16.8, and 6.17, but also contains an anomalous “0” and duplicated commit metadata. Confirm affected ranges and backports with each Linux distributor.
Exploitation context
The CVSS 3.1 assessment is 7.8 and describes local, low-privileged exploitation without user interaction. The supplied sources do not establish a reliable exploitation method, public weaponization, or active exploitation. The CVE is not listed as KEV in the bundle. Concurrent filesystem activity is described as the race trigger, not proof that an attacker can consistently control the outcome.
Researcher notes
CWE-362 fits the stale-parent race. The security consequences are inferred from incorrect inode state application and unbalanced CEPH_CAP_PIN references, consistent with the supplied CVSS impacts. The bundle does not specify affected version ranges cleanly, distribution backport status, reproducibility, or observed exploitation. Avoid asserting that every kernel between the named versions is vulnerable without vendor confirmation.
Mitigation direction
Upgrade to a vendor-supported kernel containing the referenced Ceph fixes or confirmed distribution backports.
Check Linux distributor advisories for exact affected and corrected package versions.
Restrict untrusted local access on exposed CephFS clients until remediation is verified.
Prioritize multi-user CephFS clients handling sensitive or availability-critical workloads.
Validation and detection
Inventory Linux hosts using the in-kernel CephFS client and record their kernel package versions.
Compare deployed kernels against distributor advisories and the three referenced stable commits.
Confirm replacement kernels are running after updates, including hosts requiring reboot.
Review kernel and Ceph client logs for crashes, reference-accounting warnings, or unexplained directory behavior.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-362: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-362 · source CWE mapping
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.