CVEBrief

Home / Linux / Linux / CVE-2025-38365

CVE-2025-38365: is it exploited, and which versions of Linux are affected and fixed?

CVE-2025-38365 is a race condition vulnerability in Linux. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 18:09 UTC). Affected: Linux from 5.18 until the fixed versions (CVE record by Linux). Fixed in 6.1.143, 6.6.96, 6.12.36, 6.15.5 and 1 more (CVE record by Linux). Severity: Critical (9.1, CVSS 3.1, from Linux).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 18:09 UTC, CVE record November 28, 2026, 17:43 UTC and NVD November 19, 2026, 07:18 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 18:09 UTC
Affected
Linux from 5.18 until the fixed versions
CVE record by Linux
Fixed in
6.1.143, 6.6.96, 6.12.36, 6.15.5 and 1 more
CVE record by Linux
Severity
Critical 9.1
CVSS 3.1 from Linux
Exploit odds (EPSS)
0.36% in 30 days
higher than 32% of CVEs; FIRST, December 3, 2026
Free for up to 3 items: a weekly email, and an alert the day CISA lists one as exploited. We email you once to confirm. More about the watch

What is CVE-2025-38365?

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix a race between renames and directory logging We have a race between a rename and directory inode logging that if it happens and we crash/power fail before the rename completes, the next time the filesystem is mounted, the log replay code will end up deleting the file that was being renamed. This is best explained following a step by step analysis of an interleaving of steps that lead into this situation. Consider the initial conditions: 1) We are at transaction N; 2) We have directories A and B created in a past transaction (< N); 3) We have inode X corresponding to a file that has 2 hardlinks, one in directory A and the other in directory B, so we'll name them as "A/foo_link1" and "B/foo_link2". Both hard links were persisted in a past transaction (< N); 4) We have inode Y corresponding to a file that as a single hard link and is located in directory A, we'll name it as "A/bar". This file was also persisted in a past transaction (< N). The steps leading to a file loss are the following and for all of them we are under transaction N: 1) Link "A/foo_link1" is removed, so inode's X last_unlink_trans field is updated to N, through btrfs_unlink() -> btrfs_record_unlink_dir(); 2) Task A starts a rename for inode Y, with the goal of renaming from "A/bar" to "A/baz", so we enter btrfs_rename(); 3) Task A inserts the new BTRFS_INODE_REF_KEY for inode Y by calling btrfs_insert_inode_ref(); 4) Because the rename happens in the same directory, we don't set the last_unlink_trans field of directoty A's inode to the current transaction id, that is, we don't cal btrfs_record_unlink_dir(); 5) Task A then removes the entries from directory A (BTRFS_DIR_ITEM_KEY and BTRFS_DIR_INDEX_KEY items) when calling __btrfs_unlink_inode() (actually the dir index item is added as a delayed item, but the effect is the same); 6) Now before task A adds the new entry "A/baz" to directory A by calling btrfs_add_link(), another task, task B is logging inode X; 7) Task B starts a fsync of inode X and after logging inode X, at btrfs_log_inode_parent() it calls btrfs_log_all_parents(), since inode X has a last_unlink_trans value of N, set at in step 1; 8) At btrfs_log_all_parents() we search for all parent directories of inode X using the commit root, so we find directories A and B and log them. Bu when logging direct A, we don't have a dir index item for inode Y anymore, neither the old name "A/bar" nor for the new name "A/baz" since the rename has deleted the old name but has not yet inserted the new name - task A hasn't called yet btrfs_add_link() to do that. Note that logging directory A doesn't fallback to a transaction commit because its last_unlink_trans has a lower value than the current transaction's id (see step 4); 9) Task B finishes logging directories A and B and gets back to btrfs_sync_file() where it calls btrfs_sync_log() to persist the log tree; 10) Task B successfully persisted the log tree, btrfs_sync_log() completed with success, and a power failure happened. We have a log tree without any directory entry for inode Y, so the log replay code deletes the entry for inode Y, name "A/bar", from the subvolume tree since it doesn't exist in the log tree and the log tree is authorative for its index (we logged a BTRFS_DIR_LOG_INDEX_KEY item that covers the index range for the dentry that corresponds to "A/bar"). Since there's no other hard link for inode Y and the log replay code deletes the name "A/bar", the file is lost. The issue wouldn't happen if task B synced the log only after task A called btrfs_log_new_name(), which would update the log with the new name for inode Y ("A/bar"). Fix this by pinning the log root during renames before removing the old directory entry, and unpinning af ---truncated---

From the CVE record by Linux, last updated August 5, 2026, 12:01 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
LinuxLinuxnot stated
LinuxLinuxfrom 5.18 until the fixed versions6.1.143, 6.6.96, 6.12.36, 6.15.5, 6.16

As the CVE record by Linux states it, last updated August 5, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
linuxlinux kernelfrom 5.18 before 6.1.143operating system
linuxlinux kernelfrom 6.2 before 6.6.96operating system
linuxlinux kernelfrom 6.7 before 6.12.36operating system
linuxlinux kernelfrom 6.13 before 6.15.5operating system
linuxlinux kernel6.16operating system
debiandebian linux11.0operating system

NVD analysis (status Modified), last modified July 30, 2026, 06:23 UTC.

How severe is CVE-2025-38365?

ScoreVersionVectorSource
Critical 9.1CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:HLinux
Medium 4.7CVSS 3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2025-38365 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
EPSS
0.36% probability of exploitation activity in the next 30 days, percentile 32.3 (FIRST EPSS, scores of December 3, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

When was it published, and where is the official record?

Reserved
April 16, 2025
Published
July 25, 2025, 12:47 UTC
CVE record updated
August 5, 2026, 12:01 UTC by Linux
NVD
Modified, last modified July 30, 2026, 06:23 UTC
Last checked
CVE list November 28, 2026, 17:43 UTC; NVD November 19, 2026, 07:18 UTC; KEV December 3, 2026, 18:09 UTC; EPSS December 3, 2026
Official record
cve.org · NVD

What other CVEs affect Linux?

Every CVE in Linux

Questions about CVE-2025-38365

Is CVE-2025-38365 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 18:09 UTC. FIRST's EPSS gives it a 0.36% chance of exploitation activity in the next 30 days (scores of December 3, 2026).

Which versions of Linux are affected by CVE-2025-38365?

Linux from 5.18 until the fixed versions, per the CVE record by Linux. The tables above give every range the sources list.

Which version fixes CVE-2025-38365?

6.1.143, 6.6.96, 6.12.36, 6.15.5 and 6.16, per the CVE record by Linux. Check the vendor's advisory before you rely on it.

How severe is CVE-2025-38365?

Critical (9.1, CVSS 3.1, from Linux). The severity table above shows each score with its source.

Where is the official record of CVE-2025-38365?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.