Look up another CVE · open CVE-2025-39927 in the interactive tracker
CVE-2025-39927
ceph: fix race condition validating r_parent before applying state
Published 2025-10-01 (13 months ago) by the Linux kernel CNA. Subsystem fs/ceph. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-39927 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.48-1 | Update the kernel and reboot. Fixed in 6.12.48-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.16.8-1 | Update the kernel and reboot. Fixed in 6.16.8-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.16.8-1 | Update the kernel and reboot. Fixed in 6.16.8-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
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. ]
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
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
- What this is
- CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH)MAINTAINERS section matched on fs/ceph/ · ceph-devel@vger.kernel.org · Supported
- Kernel module
- ceph
Check it on the machine
grep -w CONFIG_CEPH_FS /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w cephPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.
- bookworm, trixie, forky, sidm
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- Build switch
- CONFIG_CEPH_FS
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-10-01 (13 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.11%, higher than 1.3% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/ceph
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 2.6.34 | 6.12.48 | db378e6f83ec |
| 2.6.34 | 6.16.8 | 2bfe45987eb3 |
| 2.6.34 | 6.17 | 15f519e9f883 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- 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.
- AC:LAttack complexity, low
- 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.
- PR:LPrivileges required, low
- 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.
- UI:NUser interaction, none
- 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.
- S:UScope, unchanged
- 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.
- C:HConfidentiality impact, high
- `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.
- I:HIntegrity impact, high
- 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.
- A:HAvailability impact, high
- 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.