CVE-2026-143241: btrfs: zoned: don't wait for ordered extents in do_zone_finish()

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

btrfs: zoned: don't wait for ordered extents in dozonefinish()

dozonefinish() calls btrfswaitorderedroots(), which holds fsinfo->orderedoperationsmutex while waiting for writeback. It can be reached from writeback itself:

cowfilerange() -> btrfsreserveextent() -> findfreeextent() -> btrfszonefinishonebg() -> dozonefinish()

If another task holds the mutex and waits for that writeback, this deadlocks.

In general, we want to ensure all writes in the block group to complete before finishing the zone, as relocation does. However, the current callers do not need the wait (or cannot wait) in dozonefinish():

- Relocation already waits for reservations and ordered extents itself before calling btrfszonefinish(). - btrfsdeleteunusedbgs() checks that ->reserved is zero and sets the block group read-only while holding groupssem, so there can be no in-flight data write. - btrfszonefinishonebg() is called from the allocation path and cannot wait.

Dropping the wait is still safe. Once the block group is read-only, ->reserved can only drop, and for data it only drops after the ordered extent's I/O has completed. So if ->reserved is zero, no data write is left in flight. If it is non-zero, dozonefinish() returns -EAGAIN, which all callers handle.

This makes btrfszonefinishonebg() fail with -EAGAIN when it races with an allocation in the selected block group.

Affected Software

6 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.18.18<5.19
5.19
linux/kernel>=5.19.2<5.20
5.20
linux/kernel>=6.0.0<6.12.120
6.12.120
linux/kernel>=6.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.19
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.20
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.120
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  6. Compensating control

    In Btrfs zoned code, remove the ordered-extents wait (`btrfs_wait_ordered_roots()`) from `do_zone_finish()`.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:20 AM
Data Sourced
via MITRE·09:20 AM
Description
Data Sourced
via OSV·09:20 AM
DescriptionAffected Software
Data Sourced
via NVD·10:18 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this deadlock?

The issue is in the Btrfs zoned filesystem code in the Linux kernel. It can occur when zone finishing is reached from the allocation/writeback path, including a path that begins in cow_file_range() and proceeds through extent reservation and free-extent selection.

2

What conditions trigger the deadlock?

The deadlock requires do_zone_finish() to wait for ordered extents while holding fs_info->ordered_operations_mutex, and writeback to re-enter that path. If another task holds the mutex while waiting for the same writeback, neither task can proceed.

3

Which zone-finishing callers are relevant when assessing impact?

The described callers are relocation, deletion of unused block groups, and btrfs_zone_finish_one_bg() from the allocation path. Relocation already waits for reservations and ordered extents before zone finishing, while the allocation path cannot safely wait.

4

What does the fix change?

The fix removes the ordered-extent wait from do_zone_finish(). The description states this remains safe because once a block group is read-only, its reserved count can only decrease, and data reservations decrease only after the associated ordered extent completes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203