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

High 7.8 Published Updated

A race condition in the Linux kernel Ceph client can cause reference leaks and underflows, potentially leading to system instability or denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39927?

CVE-2025-39927 is a high-severity vulnerability in Linux kernel, published on 1 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-362

Which versions are affected by CVE-2025-39927?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39927?

Apply the vendor's patch.

Is CVE-2025-39927 being exploited?

There is no known exploitation of CVE-2025-39927 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-68001, AZL-71891, BELL-CVE-2025-39927, DEBIAN-CVE-2025-39927, GHSA-7jh2-8xqp-qc8p, ROOT-OS-DEBIAN-11-CVE-2025-39927 and 4 more.

Is CVE-2025-39927 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free