CVE-2026-139006

md/raid5: track disks array size to fix extra_page leak on error paths

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

md/raid5: track disks array size to fix extra_page leak on error paths

free_conf() iterates conf->pool_size entries to free extra_page
allocations, but pool_size may not reflect the actual size of the
conf->disks array. Two scenarios cause a mismatch:

1. setup_conf() early abort: pool_size is 0 (not yet set by
grow_stripes) but conf->disks has max_disks entries with
extra_page allocated. The loop iterates 0 times, leaking all
pages.

2. resize_stripes() Step 4 failure: conf->disks was replaced with
a newsize-entry array in Step 3, but pool_size is only updated
on success. The loop iterates pool_size (old, smaller value)
times, leaking (newsize - pool_size) pages.

Add a dedicated disks_cnt field to track the actual number of
entries in conf->disks. Set it immediately after each allocation
or replacement (in setup_conf and resize_stripes Step 3, where the
array is safely stalled with no concurrent access), and use it in
free_conf() instead of pool_size.

This leaves pool_size untouched, preserving the check_reshape()
retry behavior that depends on pool_size only being updated on
full success.

Analysis

AI-generated

Technical impact

This vulnerability causes a leak of orphaned memory pages during specific RAID5 error handling paths in the Linux kernel. If a resize or configuration operation fails, the free_conf routine miscalculates the number of pages to free due to an incorrect pool_size field, allowing allocated pages to remain in memory. Over time, this can exhaust kernel memory and cause the system to become unresponsive, effectively performing a denial‑of‑service attack.

Affected Systems

The flaw exists in all Linux kernel versions that lack the dedicated disks_cnt counter added by the patch. It affects every distribution whose kernel has not been updated to include the fix, including current stable and default releases. The commit that introduced the resolution can be found in the kernel's reflog and is normally incorporated into mainline kernels after the fix is merged.

Risk and Exploitability

The vulnerability requires a host or a privileged user to trigger a RAID5 configuration or resize that fails, which is typically achievable by an administrator or a malicious client interacting with RAID devices. No remote code execution is possible, but the memory leak can accumulate until physical memory is exhausted, leading to system instability or crash. EPSS information is not available and the issue is not listed in CISA KEV, yet the potential for resource exhaustion justifies a high‑severity assessment. Applying the patch promptly mitigates the risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the commit adding the disks_cnt field and using it in free_conf
  • Reboot the system after applying the kernel update to ensure the fixed code runs in all contexts
  • Verify that RAID5 array configuration and resizing operations no longer trigger errors that would exercise the corrected free path, and monitor kernel logs for any memory‑related warnings

Generated by OpenCVE AI on November 30, 2026 at 18:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-772
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: md/raid5: track disks array size to fix extra_page leak on error paths free_conf() iterates conf->pool_size entries to free extra_page allocations, but pool_size may not reflect the actual size of the conf->disks array. Two scenarios cause a mismatch: 1. setup_conf() early abort: pool_size is 0 (not yet set by grow_stripes) but conf->disks has max_disks entries with extra_page allocated. The loop iterates 0 times, leaking all pages. 2. resize_stripes() Step 4 failure: conf->disks was replaced with a newsize-entry array in Step 3, but pool_size is only updated on success. The loop iterates pool_size (old, smaller value) times, leaking (newsize - pool_size) pages. Add a dedicated disks_cnt field to track the actual number of entries in conf->disks. Set it immediately after each allocation or replacement (in setup_conf and resize_stripes Step 3, where the array is safely stalled with no concurrent access), and use it in free_conf() instead of pool_size. This leaves pool_size untouched, preserving the check_reshape() retry behavior that depends on pool_size only being updated on full success.
Title md/raid5: track disks array size to fix extra_page leak on error paths
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM