AZL-117283: CVE-2026-139679 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
md/raid5: reject a per-device size smaller than one chunk
Both raid5run() and raid5resize() align the per-device size down to a whole multiple of the chunk size:
mddev->devsectors &= ~(chunksectors - 1);
Neither checks the result, so a size smaller than one chunk silently becomes zero.
In raid5run() that is harmless: the array size is derived from the same zero, so the disk just ends up with no capacity.
In raid5resize() it leaves the array inconsistent -- mddev->devsectors becomes zero, while mddev->arraysectors and the gendisk capacity keep the previous. A later raid4/raid5 -> raid0 takeover copies the zero into every rdev->sectors (raid0takeoverraid45()), so createstripzones() builds a strip zone table whose zoneend is zero. Any read then passes biocheckeod() against the stale capacity and hits the BUG() in findzone():
kernel BUG at drivers/md/raid0.c:318! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Call Trace: raid0makerequest mdhandlerequest submitbionoacctnocheck blockreadfullfolio readpartsector bdevdiskchanged bdevopen
Reject a size smaller than one chunk in both functions, so that a running raid4/raid5 array always has mddev->devsectors >= one chunk.
The check is done where the value takes effect, not where it is assigned. mddev->devsectors is written from several places, and none of them can tell whether the value is usable: the chunk size may still change later. raid5run() and raid5resize() are where every input is final, so one check in each covers them all.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel md/raid5, reject per-device sizes smaller than one chunk in both raid5_run() and raid5_resize(), checking the size where it takes effect.
Event History
Frequently Asked Questions
What configuration sequence is required to trigger the kernel BUG?
The affected array must be resized so that its per-device size is smaller than one RAID chunk, causing the aligned per-device size to become zero. The array must then undergo a RAID4/RAID5-to-RAID0 takeover, after which a read can reach the BUG in raid0.c.
What is the impact if the issue is triggered?
A read against the resulting RAID0 configuration can cause a kernel BUG with an invalid-opcode Oops. The description indicates this occurs because the disk capacity remains stale while the RAID0 strip-zone table has a zero zone end.
How can I tell whether a system is in the vulnerable inconsistent state?
The described state has mddev->dev_sectors equal to zero while mddev->array_sectors and the gendisk capacity retain their previous values. It arises after resizing a RAID5 array to a per-device size below one chunk and then taking it over as RAID0.
What can be done if the resolved kernel version cannot be deployed immediately?
Avoid resizing RAID5 arrays to a per-device size smaller than the configured chunk size. Also avoid RAID4/RAID5-to-RAID0 takeover operations on arrays that may have been resized into this state.