CVE-2026-138991

md: validate bblog_size when loading v1.x badblocks metadata

7.1 high EPSS 0.17%

Published 30 Nov 2026 Updated 1 Dec 2026 CNA: Linux

Check your servers for CVE-2026-138991

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138991 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

md: validate bblog_size when loading v1.x badblocks metadata

In super_1_load(), when the on-disk feature_map does not have MD_FEATURE_BAD_BLOCKS set but sb->bblog_offset is non-zero, rdev->badblocks.shift is initialized to 0 without validating sb->bblog_size. The same field is validated in the MD_FEATURE_BAD_BLOCKS branch ("sectors > (PAGE_SIZE / 512)"), but this branch bypasses that check.

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

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

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

Severity (CVSS)

7.1 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.28% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before 2a0088960aeec328c0afa34df324192594212bf8
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before 1b9c1af3039596f2374225a5f6c9962a2a117192
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before ed3334dc84bdb5d5062955c4aece6b5bfb6a68c9
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before e507b6589712e72bb1f5eeac17f4bbfce48eb9a7
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before 6161721e0cc7cc45be5d4b2edfbec7d3f211bfeb
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before 750960f85f5467d7271b54ddc215e5800b0a08db
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before ed89d13541c89246fd410b2d95861096ad3d43c1
affected from 2699b67223aca6b1450fc2f72e40fada952afc85, before ae5f89b23cb88667cfa1273b42d6a551db9c651e
Other versions: unaffected
Linux
affected 3.1
unaffected before 3.1
unaffected from 5.10.275 up to and including 5.10.*
unaffected from 5.15.226 up to and including 5.15.*
unaffected from 6.1.193 up to and including 6.1.*
unaffected from 6.6.163 up to and including 6.6.*
unaffected from 6.12.117 up to and including 6.12.*
unaffected from 6.18.63 up to and including 6.18.*
unaffected from 7.3.4 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138991 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138991

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-138991
trivy image --scanners vuln IMAGE | grep CVE-2026-138991

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-138991 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.