AZL-117944: CVE-2026-143018 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
dm zoned: back off when reclaim cannot make progress
When a reclaim pass cannot make progress, dmzreclaimwork() still ends with dmzschedulereclaim(). If the target is idle, dmzshouldreclaim() keeps returning true, the work is queued again with no delay and the worker spins on the same failing pass. This patch handles two such cases:
- dmzdoreclaim() fails with -ENOSPC because no free zone is available to copy the data into, for example on a target without cache zones that has no free sequential zone left. The next patch also makes this the expected result when an idle target with cache zones has random zones but no free sequential zone. - dmzdoreclaim() finds no zone it can lock for reclaim and returns -EBUSY. Since commit 90a9b8693f1b ("dm zoned: reclaim random zones when idle"), dmzshouldreclaim() returns true on an idle target whenever the total number of random (and cache) zones is non-zero, whether or not any of them holds data. Each pass then also runs dmzcheckdev(), which checks every device for media events (a TEST UNIT READY on SCSI disks).
The -EBUSY loop lasts as long as the target stays idle; it ends when a pass finishes while the target is busy and has enough free zones. On three 27 TB host-managed SATA drives used as md RAID5 members (7.2.10 with the module built out of tree, all random zones free, target idle for 300 seconds, kprobes attached, two other drives on the controller being zero-filled), each member's SCSI device counted about 108,000 requests per second with the stock module and the system used about 915 s of CPU time, against about 46 s with this series. libata completes TEST UNIT READY in software, so these counters do not measure commands sent to the drives; the cost is CPU time.
When a pass fails with -ENOSPC or -EBUSY, retrying at once is unlikely to make progress: re-arm the idle poll instead, so that reclaim is retried after DMZIDLEPERIOD unless a zone allocation or a "reclaim" message queues it earlier. On a busy target, zone allocations can restart reclaim immediately when free space is low enough to require reclaim. Re-arming also keeps the poll running after a complete idle drain. The poll can still stop after a pass that ends while reclaim is not needed; that is unchanged.
Skip the device check for these two results: they normally mean that there is no zone to copy into or no zone to reclaim, not that a device failed, and the I/O paths check the devices themselves. Use queuedelayedwork() so that work an allocation has already queued is not postponed.
A pass that fails with an I/O error, for example on an unreadable block of a device that stays online, is still retried at once while the target is idle; this patch does not change that.
Tested on 7.4-rc1 with this patch and the next one, on three emulated host-managed drives (scsidebug, 1 GiB, 32 MiB zones) each under dm-zoned as md RAID5 members, all random zones free and the target idle for 300 seconds. With the stock module each member's SCSI device counted about 70.2 million requests and the reclaim workers used 726 s of CPU. With this series: 75 requests per member, 30 passes per worker (one per DMZIDLEPERIOD) and 0.08 s of CPU. Data written during the tests read back with matching checksums, and no kernel warnings were logged.
Affected Software
Event History
Frequently Asked Questions
Under what conditions can the reclaim worker repeatedly run without making progress?
This can occur when reclaim returns -ENOSPC because no free sequential zone is available for copying data, including on a target without cache zones. It can also occur when reclaim returns -EBUSY because no zone can be locked for reclaim.
Which dm-zoned targets are most likely to be affected?
Idle targets are affected when dmz_should_reclaim() continues to return true after a failed reclaim pass. This includes idle targets with random or cache zones, even when those zones do not hold data, and targets with no free sequential zone available.
What operational behavior indicates the issue is occurring?
The reclaim work is immediately requeued with no delay and repeatedly executes the same failing reclaim pass. During an -EBUSY loop, each pass also runs dmz_check_dev(), checking every device for media events, such as SCSI TEST UNIT READY requests.