PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-46160 Linux CVE debrief

A logic error in the Linux kernel's Btrfs filesystem implementation allows directory removal operations to leave stale metadata that corrupts the journal replay process. When a directory is removed via rmdir(2) while a file descriptor remains open, the kernel fails to update the directory's last_unlink_trans field. If a subsequent fsync is issued on that file descriptor before a power failure, the resulting log replay produces an inconsistent filesystem state that prevents mounting with -EIO and emits a critical corruption warning about invalid nlink counts.

Vendor
Linux
Product
Unknown
CVSS
MEDIUM 5.5
CISA KEV
Not listed in stored evidence
Original CVE published
2026-05-28
Original CVE updated
2026-06-19
Advisory published
2026-05-28
Advisory updated
2026-06-19

Who should care

Organizations running Linux systems with Btrfs root or data filesystems, particularly those with workloads involving container orchestration, build systems, or mail servers that frequently create, move, and remove directories with durability guarantees via fsync. Cloud providers offering Btrfs-backed instances and backup systems relying on Btrfs snapshots are also affected.

Technical summary

The Btrfs filesystem driver in the Linux kernel does not update the last_unlink_trans field of a directory inode when rmdir(2) succeeds. This field tracks the transaction ID of the last unlink operation and is used during log replay to determine whether an inode must be fully logged. When a directory is removed while an open file descriptor persists, and fsync is called on that descriptor, the resulting log tree contains inconsistent state: the directory appears both as deleted (in the main tree) and requiring replay (in the log). On next mount, replay encounters an inode with nlink count 2 but directory type, which violates Btrfs invariants (directories must have nlink ≤ 1), triggering -EIO and preventing mount. The fix ensures last_unlink_trans is updated during directory removal so subsequent fsync operations correctly log the inode state.

Defensive priority

high

Recommended defensive actions

  • Apply the referenced stable kernel commits to affected systems
  • Prioritize patching systems using Btrfs with workloads involving frequent directory removal and fsync operations
  • Monitor dmesg/syslog for 'BTRFS critical: corrupt leaf' and 'invalid nlink' messages indicating potential corruption from this issue
  • Verify filesystem integrity with btrfs scrub and btrfs check after unexpected power loss on unpatched systems
  • Consider disabling Btrfs tree-log (mount option nologreplay) only as temporary mitigation with acceptance of data loss risk

Evidence notes

The vulnerability description provides a complete reproduction scenario: create nested directories, sync, modify parent directory permissions, move child directory out, open file descriptor on now-empty parent, rmdir the parent, fsync the fd, then trigger power failure. The log replay fails with 'BTRFS critical: corrupt leaf: invalid nlink: has 2 expect no more than 1 for dir'. Five stable kernel commits are referenced as fixes.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-46160 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-46160

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-46160 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-46160

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Source reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/36fcc2c7517f8a86379154c9793f867592aa8b7e

    416baaa9-dc9f-4396-8d5f-8c081fb06d67

  • Source reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/999757231c49376cd1a37308d2c8c4c9932571e1

    416baaa9-dc9f-4396-8d5f-8c081fb06d67

  • Source reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/aa9c3ecaf7337df3a689318584f879b5339ede0f

    416baaa9-dc9f-4396-8d5f-8c081fb06d67

  • Source reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/cc3c0a0f965754ce230d93ba44ee5b34fbe6138a

    416baaa9-dc9f-4396-8d5f-8c081fb06d67

  • Source reference

    Unverified legacy reference

    URL: https://git.kernel.org/stable/c/fb388eb58c1ba047ccabc33901839acfecadcf49

    416baaa9-dc9f-4396-8d5f-8c081fb06d67

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.