Security Vulnerability Report
中文
CVE-2026-23348 CVSS 4.7 MEDIUM

CVE-2026-23348

Published: 2026-03-25 11:16:33
Last Modified: 2026-04-24 18:08:43
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: cxl: Fix race of nvdimm_bus object when creating nvdimm objects Found issue during running of cxl-translate.sh unit test. Adding a 3s sleep right before the test seems to make the issue reproduce fairly consistently. The cxl_translate module has dependency on cxl_acpi and causes orphaned nvdimm objects to reprobe after cxl_acpi is removed. The nvdimm_bus object is registered by the cxl_nvb object when cxl_acpi_probe() is called. With the nvdimm_bus object missing, __nd_device_register() will trigger NULL pointer dereference when accessing the dev->parent that points to &nvdimm_bus->dev. [ 192.884510] BUG: kernel NULL pointer dereference, address: 000000000000006c [ 192.895383] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20250812-19.fc42 08/12/2025 [ 192.897721] Workqueue: cxl_port cxl_bus_rescan_queue [cxl_core] [ 192.899459] RIP: 0010:kobject_get+0xc/0x90 [ 192.924871] Call Trace: [ 192.925959] <TASK> [ 192.926976] ? pm_runtime_init+0xb9/0xe0 [ 192.929712] __nd_device_register.part.0+0x4d/0xc0 [libnvdimm] [ 192.933314] __nvdimm_create+0x206/0x290 [libnvdimm] [ 192.936662] cxl_nvdimm_probe+0x119/0x1d0 [cxl_pmem] [ 192.940245] cxl_bus_probe+0x1a/0x60 [cxl_core] [ 192.943349] really_probe+0xde/0x380 This patch also relies on the previous change where devm_cxl_add_nvdimm_bridge() is called from drivers/cxl/pmem.c instead of drivers/cxl/core.c to ensure the dependency of cxl_acpi on cxl_pmem. 1. Set probe_type of cxl_nvb to PROBE_FORCE_SYNCHRONOUS to ensure the driver is probed synchronously when add_device() is called. 2. Add a check in __devm_cxl_add_nvdimm_bridge() to ensure that the cxl_nvb driver is attached during cxl_acpi_probe(). 3. Take the cxl_root uport_dev lock and the cxl_nvb->dev lock in devm_cxl_add_nvdimm() before checking nvdimm_bus is valid. 4. Set cxl_nvdimm flag to CXL_NVD_F_INVALIDATED so cxl_nvdimm_probe() will exit with -EBUSY. The removal of cxl_nvdimm devices should prevent any orphaned devices from probing once the nvdimm_bus is gone. [ dj: Fixed 0-day reported kdoc issue. ] [ dj: Fix cxl_nvb reference leak on error. Gregory (kreview-0811365) ]

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:5.14:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* - VULNERABLE
Linux Kernel (具体受影响版本请参考Git补丁链接)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC Concept based on cxl-translate.sh unit test description # This script attempts to trigger the race condition in CXL subsystem if [ "$EUID" -ne 0 ]; then echo "Please run as root" exit fi echo "[*] Loading CXL modules..." modprobe cxl_acpi modprobe cxl_pmem echo "[*] Triggering device rescan to simulate cxl_bus_rescan_queue workqueue..." echo 1 > /sys/bus/cxl/rescan & # Wait briefly to allow the queue to populate sleep 0.5 echo "[*] Removing cxl_acpi to create orphaned nvdimm objects..." # This removal creates the race condition where nvdimm_bus vanishes # while nvdimm objects are still probing rmmod cxl_acpi echo "[*] Check dmesg for 'BUG: kernel NULL pointer dereference'" dmesg | tail -20

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23348", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-25T11:16:33.050", "lastModified": "2026-04-24T18:08:42.630", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncxl: Fix race of nvdimm_bus object when creating nvdimm objects\n\nFound issue during running of cxl-translate.sh unit test. Adding a 3s\nsleep right before the test seems to make the issue reproduce fairly\nconsistently. The cxl_translate module has dependency on cxl_acpi and\ncauses orphaned nvdimm objects to reprobe after cxl_acpi is removed.\nThe nvdimm_bus object is registered by the cxl_nvb object when\ncxl_acpi_probe() is called. With the nvdimm_bus object missing,\n__nd_device_register() will trigger NULL pointer dereference when\naccessing the dev->parent that points to &nvdimm_bus->dev.\n\n[ 192.884510] BUG: kernel NULL pointer dereference, address: 000000000000006c\n[ 192.895383] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20250812-19.fc42 08/12/2025\n[ 192.897721] Workqueue: cxl_port cxl_bus_rescan_queue [cxl_core]\n[ 192.899459] RIP: 0010:kobject_get+0xc/0x90\n[ 192.924871] Call Trace:\n[ 192.925959] <TASK>\n[ 192.926976] ? pm_runtime_init+0xb9/0xe0\n[ 192.929712] __nd_device_register.part.0+0x4d/0xc0 [libnvdimm]\n[ 192.933314] __nvdimm_create+0x206/0x290 [libnvdimm]\n[ 192.936662] cxl_nvdimm_probe+0x119/0x1d0 [cxl_pmem]\n[ 192.940245] cxl_bus_probe+0x1a/0x60 [cxl_core]\n[ 192.943349] really_probe+0xde/0x380\n\nThis patch also relies on the previous change where\ndevm_cxl_add_nvdimm_bridge() is called from drivers/cxl/pmem.c instead\nof drivers/cxl/core.c to ensure the dependency of cxl_acpi on cxl_pmem.\n\n1. Set probe_type of cxl_nvb to PROBE_FORCE_SYNCHRONOUS to ensure the\n driver is probed synchronously when add_device() is called.\n2. Add a check in __devm_cxl_add_nvdimm_bridge() to ensure that the\n cxl_nvb driver is attached during cxl_acpi_probe().\n3. Take the cxl_root uport_dev lock and the cxl_nvb->dev lock in\n devm_cxl_add_nvdimm() before checking nvdimm_bus is valid.\n4. Set cxl_nvdimm flag to CXL_NVD_F_INVALIDATED so cxl_nvdimm_probe()\n will exit with -EBUSY.\n\nThe removal of cxl_nvdimm devices should prevent any orphaned devices\nfrom probing once the nvdimm_bus is gone.\n\n[ dj: Fixed 0-day reported kdoc issue. ]\n[ dj: Fix cxl_nvb reference leak on error. Gregory (kreview-0811365) ]"}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncxl: Corrige la condición de carrera del objeto nvdimm_bus al crear objetos nvdimm\n\nSe encontró el problema durante la ejecución de la prueba unitaria cxl-translate.sh. Añadir un retardo de 3s justo antes de la prueba parece hacer que el problema se reproduzca de forma bastante consistente. El módulo cxl_translate tiene una dependencia de cxl_acpi y provoca que los objetos nvdimm huérfanos se vuelvan a sondear después de que se elimine cxl_acpi. El objeto nvdimm_bus es registrado por el objeto cxl_nvb cuando se llama a cxl_acpi_probe(). Al faltar el objeto nvdimm_bus, __nd_device_register() activará una desreferencia de puntero NULL al acceder a dev-&gt;parent que apunta a &amp;nvdimm_bus-&gt;dev.\n\n[ 192.884510] BUG: desreferencia de puntero NULL del kernel, dirección: 000000000000006c\n[ 192.895383] Nombre del hardware: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20250812-19.fc42 08/12/2025\n[ 192.897721] Cola de trabajo: cxl_port cxl_bus_rescan_queue [cxl_core]\n[ 192.899459] RIP: 0010:kobject_get+0xc/0x90\n[ 192.924871] Traza de llamada:\n[ 192.925959] \n[ 192.926976] ? pm_runtime_init+0xb9/0xe0\n[ 192.929712] __nd_device_register.part.0+0x4d/0xc0 [libnvdimm]\n[ 192.933314] __nvdimm_create+0x206/0x290 [libnvdimm]\n[ 192.936662] cxl_nvdimm_probe+0x119/0x1d0 [cxl_pmem]\n[ 192.940245] cxl_bus_probe+0x1a/0x60 [cxl_core]\n[ 192.943349] really_probe+0xde/0x380\n\nEste parche también se basa en el cambio anterior donde se llama a devm_cxl_add_nvdimm_bridge() desde drivers/cxl/pmem.c en lugar de drivers/cxl/core.c para asegurar la dependencia de cxl_acpi en cxl_pmem.\n\n1. Establecer probe_type de cxl_nvb a PROBE_FORCE_SYNCHRONOUS para asegurar que el controlador sea sondeado sincrónicamente cuando se llama a add_device().\n2. Añadir una comprobación en __devm_cxl_add_nvdimm_bridge() para asegurar que el controlador cxl_nvb esté adjunto durante cxl_acpi_probe().\n3. Tomar el bloqueo cxl_root uport_dev y el bloqueo cxl_nvb-&gt;dev en devm_cxl_add_nvdimm() antes de comprobar que nvdimm_bus es válido.\n4. Establecer el indicador cxl_nvdimm a CXL_NVD_F_INVALIDATED para que cxl_nvdimm_probe() salga con -EBUSY.\n\nLa eliminación de dispositivos cxl_nvdimm debería evitar que cualquier dispositivo huérfano se sondee una vez que el nvdimm_bus haya desaparecido.\n\n[ dj: Se corrigió el problema de kdoc reportado el día 0. ]\n[ dj: Corrig ... (truncated)