CVE-2026-90260: btrfs: zoned: don't clobber the extent buffer when zeroing it out
In the Linux kernel, the following vulnerability has been resolved:
btrfs: zoned: don't clobber the extent buffer when zeroing it out
On a zoned filesystem a freed-but-still-dirty tree block is written out as zeros (EXTENTBUFFERZONEDZEROOUT) only to keep the zone write pointer advancing. btreecsumonebio() implemented this by memzeroing the extent buffer's own folios before submission.
That destroys the in-memory buffer while it may still be referenced. In particular btrfsfreetreeblock() can run on it afterwards and reads the header to add a delayed reference; once the header has been zeroed it frees bytenr 0 and corrupts the extent tree (the btrfsheaderbytenr(buf) != 0 ASSERT in btrfsfreetreeblock(), or an "unable to find ref" abort). It is flaky and reproduces under fsstress, e.g. generic/461 and generic/013.
Write the zeros to disk from the shared zero page instead and leave the extent buffer content untouched, so any later reference - including the delayed reference from btrfsfreetreeblock() - still sees a valid header. endbbiometawrite() now clears writeback on the buffer's own folios, as the bio no longer carries them.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Apply the kernel fix for the Btrfs zoned filesystem vulnerability by changing the zeroing-out path to write zeros from the shared zero page, and restrict EXTENT_BUFFER_ZONED_ZEROOUT usage to the zone write btree requirement so the extent buffer contents are not clobbered while still referenced.
Linux kernel btrfs zoned zeroing behavior (extent buffer zeroout) = Write zeros to disk using the shared zero page and keep EXTENT_BUFFER_ZONED_ZEROOUT only for maintaining zone write btree behavior - Configuration
Apply the Btrfs fix so end_bbio_meta_write() clears writeback while leaving the buffer's own extent-buffer content untouched; this prevents later delayed references from observing corrupted folios since the bio no longer carries them.
Linux kernel (Btrfs) end_bbio_meta_write() writeback clearing = Clear writeback on the buffer's own extent buffer content untouched
Event History
Frequently Asked Questions
Which systems are affected?
The issue affects Linux systems using Btrfs on a zoned filesystem. The problematic path involves freed but still-dirty tree blocks that are written as zeros to advance a zone write pointer.
What are the likely operational symptoms?
The filesystem can corrupt the extent tree. Observed symptoms include a btrfs_free_tree_block() assertion that the header bytenr is nonzero, or an "unable to find ref" abort.
How can the issue be reproduced or identified during testing?
The failure is described as flaky and has reproduced under fsstress, including generic/461 and generic/013. These tests may help expose the condition on affected zoned Btrfs configurations.