Skip to contentSkip to conversation

CVE-2026-45896: mtd: intel-dg: Fix accessing regions before setting nregions

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

mtd: intel-dg: Fix accessing regions before setting nregions

The regions array is counted by nregions, but it's set only after accessing it:

[] UBSAN: array-index-out-of-bounds in drivers/mtd/devices/mtd_intel_dg.c:750:15 [] index 0 is out of range for type '<unknown> [*]'

Fix it by also fixing an undesired behavior: the loop silently ignores ENOMEM and continues setting the other entries.

The Linux kernel CVE team has assigned CVE-2026-45896 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.17 with commit ceb5ab3cb64637952657be23d347e1c79dd02212 and fixed in 6.18.14 with commit 721bd22bcf45a63ebd9bd0f478ef721b45cc5383
	Issue introduced in 6.17 with commit ceb5ab3cb64637952657be23d347e1c79dd02212 and fixed in 6.19.4 with commit d58fca8513414b15387460b14a7a0a30405b9c9e
	Issue introduced in 6.17 with commit ceb5ab3cb64637952657be23d347e1c79dd02212 and fixed in 7.0 with commit 779c59274d03cc5c07237a2c845dfb71cff77705

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-45896

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/mtd/devices/mtd_intel_dg.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/721bd22bcf45a63ebd9bd0f478ef721b45cc5383
	https://git.kernel.org/stable/c/d58fca8513414b15387460b14a7a0a30405b9c9e
	https://git.kernel.org/stable/c/779c59274d03cc5c07237a2c845dfb71cff77705