CVE-2026-138991: md: validate bblog_size when loading v1.x badblocks metadata

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

md: validate bblogsize when loading v1.x badblocks metadata

In super1load(), when the on-disk featuremap does not have MDFEATUREBADBLOCKS set but sb->bblogoffset is non-zero, rdev->badblocks.shift is initialized to 0 without validating sb->bblogsize. The same field is validated in the MDFEATUREBADBLOCKS branch ("sectors > (PAGESIZE / 512)"), but this branch bypasses that check.

A forged on-disk superblock (malicious storage device or crafted image) can therefore carry an oversized sb->bblogsize. When bad blocks are later recorded, super1sync() sets bb->size from sb->bblogsize and mdwritemetadata() issues a bio larger than the single rdev->bbpage, reading beyond the page and leaking kernel memory contents to disk.

sb->bblogsize is never modified by the kernel between load and sync, and the MDFEATUREBADBLOCKS branch already validates it, so checking it in this branch is sufficient to cover both paths.

Fix this by rejecting an oversized sb->bblogsize with -EINVAL, matching the existing check in the MDFEATUREBADBLOCKS branch.

Affected Software

12 affected componentsFixes available
Linux Linux kernel
linux/kernel>=3.1.0<5.10.275
5.10.275
linux/kernel>=5.11.0<5.15.226
5.15.226
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3
6.12.117-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.275
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.226
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1
  9. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  10. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1Fixed in 7.3.4-1
  11. Compensating control

    In the Linux kernel's super_1_load(), reject an oversized sb->bblog_size with -EINVAL when MD_FEATURE_BAD_BLOCKS is not set but sb->bblog_offset is non-zero.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
Description
Data Sourced
via OSV·01:26 PM
DescriptionAffected Software
Data Sourced
via NVD·02:18 PM
Description

Frequently Asked Questions

1

What systems are realistically exposed to this issue?

Systems that load v1.x MD RAID metadata from a malicious storage device or a crafted image are exposed if the superblock has a nonzero bblog_offset, lacks the MD_FEATURE_BAD_BLOCKS feature flag, and contains an oversized bblog_size.

2

What must happen for kernel memory to be leaked?

The forged metadata must be loaded first, and bad blocks must later be recorded. During metadata synchronization, the kernel can write more data than fits in the single bad-blocks page, causing memory beyond that page to be written to disk.

3

How can administrators identify affected on-disk metadata?

Inspect v1.x MD superblocks for a nonzero bblog_offset while MD_FEATURE_BAD_BLOCKS is not set, then check whether bblog_size exceeds PAGE_SIZE / 512 sectors. The fixed kernel rejects such metadata with -EINVAL when loading it.

4

What can be done before applying the fix?

Do not attach or assemble untrusted MD arrays, storage devices, or crafted disk images that may contain forged v1.x MD superblocks. Avoid actions that record bad blocks on arrays whose metadata cannot be trusted.

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