libnvdimm/labels: Fix divide error in nd_label_data_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d47aad4570e5e6e9a8162bb417ca9b74132f27c · < 1d1e1efad1cf049e888bf175a5c6be85d792620c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
libnvdimm/labels: Fix divide error in nd_label_data_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:nd_label_data_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: .config_size = mds->lsa_size,
3) max_xfer is set to zero (nvdimm driver):
From the CVE record · Linux
The Linux kernel’s libnvdimm label initialization can divide by zero when a faulty CXL memory device reports an LSA size of zero. Someone able to supply that faulty device information could trigger a kernel divide error; the input does not specify an authentication requirement or user interaction.
Engineers running Linux kernels with libnvdimm and CXL memory devices should check their systems; affected versions are not specified.