CVE-2026-139679

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

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

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

Both raid5_run() and raid5_resize() align the per-device size down to a
whole multiple of the chunk size:

mddev->dev_sectors &= ~(chunk_sectors - 1);

Neither checks the result, so a size smaller than one chunk silently
becomes zero.

In raid5_run() that is harmless: the array size is derived from the same
zero, so the disk just ends up with no capacity.

In raid5_resize() it leaves the array inconsistent -- mddev->dev_sectors
becomes zero, while mddev->array_sectors and the gendisk capacity keep the
previous. A later raid4/raid5 -> raid0 takeover copies the zero into every
rdev->sectors (raid0_takeover_raid45()), so create_strip_zones() builds a
strip zone table whose zone_end is zero. Any read then passes
bio_check_eod() against the stale capacity and hits the BUG() in
find_zone():

kernel BUG at drivers/md/raid0.c:318!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
Call Trace:
raid0_make_request
md_handle_request
submit_bio_noacct_nocheck
block_read_full_folio
read_part_sector
bdev_disk_changed
bdev_open

Reject a size smaller than one chunk in both functions, so that a running
raid4/raid5 array always has mddev->dev_sectors >= one chunk.

The check is done where the value takes effect, not where it is assigned.
mddev->dev_sectors is written from several places, and none of them can
tell whether the value is usable: the chunk size may still change later.
raid5_run() and raid5_resize() are where every input is final, so one check
in each covers them all.

Analysis

AI-generated

Technical impact

The Linux kernel bug occurs when the RAID5 run or resize functions reduce a per‑device size that is smaller than a single chunk to zero without validating the result. In a resize scenario this makes the device sector count zero while the array’s sector count and disk capacity remain unchanged, creating a metadata inconsistency. A later RAID4/5 to RAID0 takeover copies the zero value into each raid device, causing the strip‑zone table to have a zone end of zero. Any read that checks the end of data (bio_check_eod) then hits a kernel BUG in the raid0 code, resulting in an Oops and a crash. Consequently the system cannot continue to operate, effectively denying service to the affected node.

Affected Systems

The flaw affects the Linux kernel’s RAID4/5 implementation. Any kernel revision that contains the legacy raid5_run and raid5_resize logic without the fix can be impacted; this includes all retained kernel versions before the patch was applied.

Risk and Exploitability

The CVSS score is 4.4, the EPSS score is not available, and the vulnerability is not listed in CISA KEV. Exploitation requires the ability to configure or resize a RAID array, typically available only to privileged users or an attacker who can execute privileged code on the host. The attack vector is therefore local or privileged. Because the flaw triggers a kernel crash, the impact is high if an exploit succeeds, but the lack of public exploitation reduces the immediate threat to a moderate level. Nonetheless, any successful exploitation results in a denial of service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that contains the fixed raid5_run and raid5_resize logic, which rejects per‑device sizes smaller than one chunk.
  • Verify that no RAID4/5 arrays are created or resized with a per‑device size less than the chunk size, ensuring device geometry validation before applying configuration changes.
  • Monitor system logs for Oops or BUG messages related to drivers/md/raid0.c; if a crash occurs, reboot promptly and investigate potential misuse of RAID configuration tools.

Generated by OpenCVE AI on December 1, 2026 at 16:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-665
Type Values Removed Values Added
Weaknesses CWE-617
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-119
CWE-665
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: md/raid5: reject a per-device size smaller than one chunk Both raid5_run() and raid5_resize() align the per-device size down to a whole multiple of the chunk size: mddev->dev_sectors &= ~(chunk_sectors - 1); Neither checks the result, so a size smaller than one chunk silently becomes zero. In raid5_run() that is harmless: the array size is derived from the same zero, so the disk just ends up with no capacity. In raid5_resize() it leaves the array inconsistent -- mddev->dev_sectors becomes zero, while mddev->array_sectors and the gendisk capacity keep the previous. A later raid4/raid5 -> raid0 takeover copies the zero into every rdev->sectors (raid0_takeover_raid45()), so create_strip_zones() builds a strip zone table whose zone_end is zero. Any read then passes bio_check_eod() against the stale capacity and hits the BUG() in find_zone(): kernel BUG at drivers/md/raid0.c:318! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Call Trace: raid0_make_request md_handle_request submit_bio_noacct_nocheck block_read_full_folio read_part_sector bdev_disk_changed bdev_open Reject a size smaller than one chunk in both functions, so that a running raid4/raid5 array always has mddev->dev_sectors >= one chunk. The check is done where the value takes effect, not where it is assigned. mddev->dev_sectors is written from several places, and none of them can tell whether the value is usable: the chunk size may still change later. raid5_run() and raid5_resize() are where every input is final, so one check in each covers them all.
Title md/raid5: reject a per-device size smaller than one chunk
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM