Permanent file deletion via unsynchronized directory logging
Published Jul 25, 2025 · Updated Aug 5, 2026
Race condition in Btrfs directory logging in Linux allows remote attackers to delete files via concurrent rename and fsync operations. btrfs_log_all_parents() logs a directory after __btrfs_unlink_inode() removes the old entry but before btrfs_add_link() inserts the new entry. Ordinary write access to a Btrfs-backed SMB or NFS export is sufficient, and an unclean shutdown makes replay unlink the last name and permanently lose the file.
Summary
What happened
Race condition in Btrfs directory logging in Linux allows remote attackers to delete files via concurrent rename and fsync operations. btrfs_log_all_parents() logs a directory after __btrfs_unlink_inode() removes the old entry but before btrfs_add_link() inserts the new entry. Ordinary write access to a Btrfs-backed SMB or NFS export is sufficient, and an unclean shutdown makes replay unlink the last name and permanently lose the file.
The record
- CVE
- CVE-2025-38365
- Published
- Jul 25, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-362, T1485
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jul 25, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=259c4b96d78dda8477a3ac21d6b3cf0eb9f75c8b <2088895d5903082bb9021770b919e733c57edbc1
- Affected versionversion=259c4b96d78dda8477a3ac21d6b3cf0eb9f75c8b <3ca864de852bc91007b32d2a0d48993724f4abad
- Affected versionversion=259c4b96d78dda8477a3ac21d6b3cf0eb9f75c8b <51bd363c7010d033d3334daf457c824484bf9bf0
- Affected versionversion=259c4b96d78dda8477a3ac21d6b3cf0eb9f75c8b <8c6874646c21bd820cf475e2874e62c133954023
- Affected versionversion=259c4b96d78dda8477a3ac21d6b3cf0eb9f75c8b <aeeae8feeaae4445a86f9815273e81f902dc1f5b
- Affected versionversion=5.18
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo