CVE-2026-143243: btrfs: zoned: only change active zone counter on successful (de)activation
In the Linux kernel, the following vulnerability has been resolved:
btrfs: zoned: only change active zone counter on successful (de)activation
btrfszoneactivate() unconditionally decrements the reservedactivezones counter regardless if btrfsdevsetactivezone() fails to set the zone active, i.e. because it raced with another call that already set the bit in the bitmask, or not.
This can lead to a double decrement of the counter in case the bit has already been set.
Only decrement the counter iff btrfsdevsetactivezone() successfully marked the zone in the bitmap.
Mirror this behaviour when clearing the bit again.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which deployments are implicated by this issue?
The issue is in the Btrfs zoned code path of the Linux kernel. The provided information does not identify affected kernel versions or establish whether non-zoned Btrfs deployments are affected.
What condition causes the active-zone counter to become inaccurate?
A race can occur when a zone is already marked active in the bitmap and another activation attempt fails to set that bit. The counter may then be decremented despite no successful state change, potentially causing a double decrement; analogous accounting is required when clearing the bit.
Are upstream fix references available for backport verification?
Yes. The provided references identify fixes at aba46638426ee1739e86db61e4cc94559b5fb312, a5639ba463867ad47bfab44e36c74cff0510d024, and 46a94be3ce1600b7dca4be4eee32aaa0d8ea17e3.