CVE-2025-38072

Source
https://cve.org/CVERecord?id=CVE-2025-38072
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38072.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38072
Downstream
Related
Published
2025-06-18T09:33:48.666Z
Modified
2026-05-07T04:15:59.380898Z
Summary
libnvdimm/labels: Fix divide error in nd_label_data_init()
Details

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

libnvdimm/labels: Fix divide error in ndlabeldata_init()

If a faulty CXL memory device returns a broken zero LSA size in its memory device information (Identify Memory Device (Opcode 4000h), CXL spec. 3.1, 8.2.9.9.1.1), a divide error occurs in the libnvdimm driver:

Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:ndlabeldata_init+0x10e/0x800 [libnvdimm]

Code and flow:

1) CXL Command 4000h returns LSA size = 0 2) config_size is assigned to zero LSA size (CXL pmem driver):

drivers/cxl/pmem.c: .configsize = mds->lsasize,

3) max_xfer is set to zero (nvdimm driver):

drivers/nvdimm/label.c: maxxfer = mint(sizet, ndd->nsarea.maxxfer, config_size);

4) A subsequent DIVROUNDUP() causes a division by zero:

drivers/nvdimm/label.c: /* Make our initial read size a multiple of maxxfer size */ drivers/nvdimm/label.c: readsize = min(DIVROUNDUP(readsize, maxxfer) * maxxfer, drivers/nvdimm/label.c- configsize);

Fix this by checking the config size parameter by extending an existing check.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38072.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7d47aad4570e5e6e9a8162bb417ca9b74132f27c
Fixed
2bd4a938d2eda96ab7288b8fa5aae84a1de8c4ca
Fixed
396c46d3f59a18ebcc500640e749f16e197d472b
Fixed
f49c337037df029440a8390380dd35d2cf5924d3
Fixed
db1aef51b8e66a77f76b1250b914589c31a0a0ed
Fixed
ea3d95e05e97ea20fd6513f647393add16fce3b2
Fixed
1d1e1efad1cf049e888bf175a5c6be85d792620c
Fixed
e14347f647ca6d76fe1509b6703e340f2d5e2716
Fixed
ef1d3455bbc1922f94a91ed58d3d7db440652959

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38072.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.294
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.238
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.185
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.141
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.93
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.31
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.14.9

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38072.json"