AZL-118703: CVE-2026-143378 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
btrfs: zoned: fix double free of bitmaps on clone failure
btrfsclonedevzoneinfo() duplicates the original origdev->zoneinfo with kmemdup(), which also copies the seqzones, emptyzones and activezones pointers. The clone then replaces them one by one with fresh bitmaps. If one of the allocations fails, the error path frees all three pointers, including those not yet replaced, which still point to the bitmaps owned by the original device.
Clear the three pointers right after kmemdup() so the error path only frees what this function allocated.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In btrfs_clone_dev_zone_info(), clear the three pointers immediately after kmemdup() so the error path frees only allocations made by this function.
Event History
Frequently Asked Questions
What system activity is involved in reaching the faulty cleanup path?
The issue is in Btrfs zoned-device cloning. It is reached when bitmap allocation fails while btrfs_clone_dev_zone_info() is creating replacement zone bitmaps for a cloned device.
What is freed incorrectly when that allocation fails?
The cleanup path can free bitmap pointers that still belong to the original device, because kmemdup() copied the original seq_zones, empty_zones, and active_zones pointers before all of them were replaced in the clone.
What does the resolved change do to prevent the problem?
It clears the three copied bitmap pointers immediately after kmemdup(). This ensures that an allocation-failure cleanup frees only bitmaps allocated by the clone operation.