CVE-2026-139679: md/raid5: reject a per-device size smaller than one chunk

Published Nov 30, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In Linux MD, reject per-device sizes smaller than one chunk in both raid5_run() and raid5_resize(), checking where the aligned value takes effect.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description

Frequently Asked Questions

1

What configuration is required to trigger the kernel BUG?

The affected RAID4/RAID5 array must be resized so that its per-device size is smaller than one chunk, causing the aligned per-device size to become zero. The array must then undergo a RAID4/RAID5-to-RAID0 takeover; subsequent reads can reach the BUG in raid0's find_zone().

2

Is creating or starting an array with a per-device size smaller than one chunk equally dangerous?

No. In raid5_run(), the zero per-device size also produces a zero-capacity array, which the description identifies as harmless. The inconsistent state arises specifically when raid5_resize() zeros mddev->dev_sectors while retaining the prior array and disk capacity.

3

What is the practical impact if the vulnerable sequence occurs?

A read against the resulting RAID0 array can trigger a kernel BUG at drivers/md/raid0.c:318, producing an invalid-opcode oops. This can cause a system crash or loss of availability.

4

What should administrators avoid before applying the fix?

Do not resize RAID4/RAID5 arrays to a per-device size smaller than the configured chunk size, particularly if a later takeover to RAID0 is planned. Avoid performing the RAID4/RAID5-to-RAID0 takeover on an array that has undergone such a resize.

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