# CVE-2025-39927: ceph: fix race condition validating r_parent before applying state

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-10-01T08:07:14.595Z
- Modified: 2026-10-21T13:18:16.970Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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. ]

(As written by CVE List.)

## Affected

- Linux Linux: from 9030aaf9bf0a1eee47a154c316c789e959638b0f before dc5aad078abc416dd3d555c50f5308c16ba918a7; from 9030aaf9bf0a1eee47a154c316c789e959638b0f before db378e6f83ec705c6091c65d482d555edc2b0a72; from 9030aaf9bf0a1eee47a154c316c789e959638b0f before 2bfe45987eb346e299d9f763f9cd05f77011519f; from 9030aaf9bf0a1eee47a154c316c789e959638b0f before 15f519e9f883b316d86e2bb6b767a023aafd9d83; 2.6.34 (not affected: before 2.6.34; from 6.6.160 up to 6.6.*; from 6.12.48 up to 6.12.*; from 6.16.8 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 2.6.35 before 6.12.48; from 6.13 before 6.16.8; 2.6.34; 6.17

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/dc5aad078abc416dd3d555c50f5308c16ba918a7>
- <https://git.kernel.org/stable/c/db378e6f83ec705c6091c65d482d555edc2b0a72> (patch)
- <https://git.kernel.org/stable/c/2bfe45987eb346e299d9f763f9cd05f77011519f> (patch)
- <https://git.kernel.org/stable/c/15f519e9f883b316d86e2bb6b767a023aafd9d83> (patch)

## Sources

- CVE List: [CVE-2025-39927](https://www.cve.org/CVERecord?id=CVE-2025-39927), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2025-39927](https://nvd.nist.gov/vuln/detail/CVE-2025-39927), Public domain, modified 2026-10-21

---

Page: https://cve.day/CVE-2025-39927 · Whole record: https://cve.day/CVE-2025-39927.json · Rebuilt by cve.day 2026-11-25T22:59:05.397Z
