ZeroHour

CVE-2026-89559

niche

Integer Overflow to Kernel Out-of-Bounds Write in Linux libnvdimm Label Validation

CVSS 3.1
7.8 high
EPSS
Published
()
Modified
AI analysis

The Linux kernel's libnvdimm label-validation routine __nd_label_validate() bounds the on-media namespace index field nslot against the DIMM config area size, but because sizeof_namespace_label() returns unsigned, the product nslot * label_size is evaluated in 32-bit arithmetic and wraps, letting a crafted nslot pass the check. The value is then used as the loop trip count in nd_label_data_init(), whose memset() writes past the end of the config_size buffer, causing an out-of-bounds write in kernel memory. The malicious nslot can originate from tampered NVDIMM media or from local userspace via the ND_CMD_SET_CONFIG_DATA command, so a privileged local attacker (or one able to tamper with the medium) can achieve kernel memory corruption with high confidentiality, integrity, and availability impact (CVSS 3.1: 7.8). The check was originally safe when introduced by commit 4a826c83db4e (size_t multiplication) and regressed when commit 564e871aa66f made the label size a runtime value; only systems with NVDIMM/label-capable persistent memory hardware have the vulnerable path reachable. No public PoC exists and no exploitation in the wild is known.

What to do: Patch to a kernel release containing the fix (the product nslot * label_size is now evaluated in 64-bit) as soon as your distro ships it, prioritizing hosts that actually have NVDIMMs. Until then, restrict root access and access to /dev/nfit/* devices and the ndctl tooling on persistent-memory systems, since ND_CMD_SET_CONFIG_DATA is the userspace write path. Treat swapped-in or second-hand NVDIMM media as untrusted and re-validate labels after hardware changes.

Affected
Linux kernel (libnvdimm namespace label handling)Kernel versions containing commit 564e871aa66f (libnvdimm v1.2 label definitions) up to versions lacking this fix; kernels with only commit 4a826c83db4e are not
Estimated exposure
nicheon the order of 10^3-10^4 servers worldwide with NVDIMM/persistent-memory hardware installed — NVDIMM-N and Intel Optane PMEM are niche, modest-volume enterprise hardware categories, and the vulnerable code path requires such hardware plus privileged local access or media tampering, so only a small subset of the billions of Linux…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: libnvdimm/labels: Prevent integer overflow in __nd_label_validate() The on-media namespace index field nslot is a u32 read from the DIMM label storage area. __nd_label_validate() bounds it against the config area size, but sizeof_namespace_label() returns unsigned, so the product nslot * label_size is evaluated in 32-bit and wraps modulo 2^32 before the comparison. A crafted nslot passes the bound and is then used as the loop trip count in nd_label_data_init(), whose memset() walks off the end of the config_size buffer: an out-of-bounds write. The field is not trusted -- it comes from the medium, or from userspace via ND_CMD_SET_CONFIG_DATA. Evaluate the product in 64-bit so the bound check is exact; conforming labels are unaffected. The check was safe when introduced by commit 4a826c83db4e ("libnvdimm: namespace indices: read and validate"): it multiplied by sizeof(struct nd_namespace_label), a size_t, so on a 64-bit build the product did not wrap. Commit 564e871aa66f ("libnvdimm, label: add v1.2 nvdimm label definitions") narrowed it to 32 bits when the label size became a runtime value read via sizeof_namespace_label().

Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.