Linux Kernel Discard Sector Misconfiguration Vulnerability in RAID0 and RAID10

Vulnerability

A vulnerability exists in the Linux kernel's handling of discard sectors for RAID0 and RAID10 configurations. The issue arises because these RAID levels incorrectly set the maximum discard sectors value based on stack drivers, rather than using the appropriate limits from the disk stack. This misconfiguration can lead to the export of inaccurate discard sector values, particularly when all member disks are rotational. The problem is exacerbated by a bug that causes RAID0 and RAID10 to report misleading values, which can trigger warning messages during certain file system operations, such as when using 'mkfs.xfs'.

Impact

Exploitation of this vulnerability causes the RAID0 and RAID10 configurations to export incorrect maximum discard sector values, which can lead to improper handling of discard operations. This misrepresentation can cause issues with file system management and optimization, particularly for operations that rely on accurate discard sector information, such as those involving solid-state drives (SSDs) or NVMe devices.

Reproduction

To reproduce this vulnerability, create a RAID0 or RAID10 array using rotational disks. Once the array is active, check the maximum discard sectors value exported by the RAID configuration. It will incorrectly reflect a value suitable for SSDs or NVMe devices, despite the underlying disks being rotational. This can be verified by observing the warning messages generated by the 'blkdev_issue_discard' function when running 'mkfs.xfs' on the affected RAID array.

Remediation

The vulnerability has been addressed in the Linux kernel. Users should upgrade to the latest version where this issue has been fixed.

Added: Dec 8, 2025, 3:06 AM
Updated: Dec 8, 2025, 3:06 AM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.0
exploitability
5.3
remediation
7.7
relevance
1.4
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.