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

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-02)
- Published: 2026-05-27T12:17:06.332Z
- Modified: 2026-06-25T21:09:48.927Z
- Weaknesses: CWE-129
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from ceb5ab3cb64637952657be23d347e1c79dd02212 before 721bd22bcf45a63ebd9bd0f478ef721b45cc5383; from ceb5ab3cb64637952657be23d347e1c79dd02212 before d58fca8513414b15387460b14a7a0a30405b9c9e; from ceb5ab3cb64637952657be23d347e1c79dd02212 before 779c59274d03cc5c07237a2c845dfb71cff77705; 6.17 (not affected: before 6.17; from 6.18.14 up to 6.18.*; from 6.19.4 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.17 before 6.18.14; from 6.19 before 6.19.4

## References

- <https://git.kernel.org/stable/c/721bd22bcf45a63ebd9bd0f478ef721b45cc5383> (patch)
- <https://git.kernel.org/stable/c/d58fca8513414b15387460b14a7a0a30405b9c9e> (patch)
- <https://git.kernel.org/stable/c/779c59274d03cc5c07237a2c845dfb71cff77705> (patch)

## Sources

- CVE List: [CVE-2026-45896](https://www.cve.org/CVERecord?id=CVE-2026-45896), CVE Terms of Use, modified 2026-05-27
- NVD: [CVE-2026-45896](https://nvd.nist.gov/vuln/detail/CVE-2026-45896), Public domain, modified 2026-06-25

---

Page: https://cve.day/CVE-2026-45896 · Whole record: https://cve.day/CVE-2026-45896.json · Rebuilt by cve.day 2026-11-25T22:59:22.493Z
