AZL-118244: CVE-2026-143166 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix bio counter and bioc leak when async checksumming fails
A single failed checksum allocation can make a later device replace hang forever. btrfssubmitchunk() takes a dev-replace bio counter reference and a bioc before it hands a write to the checksum worker. If the checksum fails there (e.g., its allocation fails), runoneasyncdone() ends the bio but drops neither. The counter then never gets back to zero and the next replace waits for it:
[ 8.369] BTRFS info (device ram0): devreplace from /dev/ram0 (devid 1) to /dev/ram1 finished [41.534] INFO: task btrfscsum:80 blocked for more than 20 seconds. [41.534] btrfsrmdevreplaceblocked+0x135/0x180 [41.534] btrfsdevreplacefinishing+0xefe/0x13b0
The worker is only used when CONFIGBTRFSEXPERIMENTAL is off and the checksum isn't a fast one, e.g., sha256. We hit it on a sha256 filesystem.
We put the bioc and drop the counter in that error branch. We also put the bioc on the synchronous error path and on the btrfssplitbio() error path, which both only drop the counter. With the fix, the replace doesn't hang anymore.
This bug was identified and confirmed with the help of fault-injection testing on a deterministic hypervisor currently under development. Our C reproducer however hits it within about 35s.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Btrfs async-checksum failure handling, release the bioc and decrement the dev-replace bio counter on the synchronous error path and the btrfs_split_bio() error path.
Event History
Frequently Asked Questions
Which systems are most likely to encounter this issue?
Systems using Btrfs with device replacement operations are exposed when asynchronous checksumming is used. The affected checksum worker is used when CONFIG_BTRFS_EXPERIMENTAL is disabled and the filesystem uses a non-fast checksum such as sha256.
What event is required to trigger the hang?
A checksum allocation must fail after btrfs_submit_chunk() has acquired a device-replace bio counter reference and bioc. The leaked reference can then prevent the counter from reaching zero, causing a later device replacement to wait indefinitely.
How can an administrator recognize that the system is affected?
A device replacement may appear to finish, followed by a blocked btrfscsum task and a stack trace involving btrfs_rm_dev_replace_blocked and btrfs_dev_replace_finishing. This occurs after an asynchronous checksum failure leaves the device-replace counter unreleased.