LinuxのLinux Kernelにおける競合状態に関する脆弱性
タイトル LinuxのLinux Kernelにおける競合状態に関する脆弱性
概要

Linuxカーネルにおいて、cxl: nvdimmオブジェクト作成時のnvdimm_busオブジェクトの競合状態が修正されました。cxl-translate.shのユニットテスト実行中に問題が発見され、テストの直前に3秒のスリープを追加することで問題がかなり一貫して再現されることが確認されました。cxl_translateモジュールはcxl_acpiに依存しており、cxl_acpiが削除された後に孤立したnvdimmオブジェクトが再検出される原因となっていました。nvdimm_busオブジェクトはcxl_acpi_probe()が呼ばれる際にcxl_nvbオブジェクトによって登録されます。nvdimm_busオブジェクトが存在しない場合、__nd_device_register()はdev-parentが&nvdimm_bus-devを指している際にNULLポインタ逆参照を引き起こします。このパッチはまた、devm_cxl_add_nvdimm_bridge()がdrivers/cxl/core.cではなくdrivers/cxl/pmem.cから呼ばれるようにした前回の変更に依存しており、その結果cxl_acpiがcxl_pmemに依存することを保証します。修正内容としては、cxl_nvbのprobe_typeをPROBE_FORCE_SYNCHRONOUSに設定し、add_device()呼び出し時にドライバが同期的にプローブされることを保証しています。また、__devm_cxl_add_nvdimm_bridge()にcxl_acpi_probe()の時点でcxl_nvbドライバが接続されていることを確認するチェックを追加しました。devm_cxl_add_nvdimm()内ではnvdimm_busが有効か確認する前にcxl_rootのuport_devロックとcxl_nvb-devロックを取得し、cxl_nvdimmフラグをCXL_NVD_F_INVALIDATEDに設定してcxl_nvdimm_probe()が-EBUSYで終了するようにしています。これにより、cxl_nvdimmデバイスの削除後にnvdimm_busがなくなった孤立したデバイスがプローブされるのを防止しています。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年3月25日0:00
登録日 2026年4月27日11:28
最終更新日 2026年4月27日11:28
CVSS3.0 : 警告
スコア 4.7
ベクター CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 5.14
Linux Kernel 5.14.1 以上 6.18.17 未満
Linux Kernel 6.19 以上 6.19.7 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年04月27日]
  掲載
2026年4月27日11:28

NVD脆弱性情報
CVE-2026-23348
概要

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) ]

概要

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:

cxl: Corrige la condición de carrera del objeto nvdimm_bus al crear objetos nvdimm

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

[ 192.884510] BUG: desreferencia de puntero NULL del kernel, dirección: 000000000000006c
[ 192.895383] Nombre del hardware: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20250812-19.fc42 08/12/2025
[ 192.897721] Cola de trabajo: cxl_port cxl_bus_rescan_queue [cxl_core]
[ 192.899459] RIP: 0010:kobject_get+0xc/0x90
[ 192.924871] Traza de llamada:
[ 192.925959]
[ 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

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

1. 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().
2. Añadir una comprobación en __devm_cxl_add_nvdimm_bridge() para asegurar que el controlador cxl_nvb esté adjunto durante cxl_acpi_probe().
3. 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.
4. Establecer el indicador cxl_nvdimm a CXL_NVD_F_INVALIDATED para que cxl_nvdimm_probe() salga con -EBUSY.

La eliminación de dispositivos cxl_nvdimm debería evitar que cualquier dispositivo huérfano se sondee una vez que el nvdimm_bus haya desaparecido.

[ dj: Se corrigió el problema de kdoc reportado el día 0. ]
[ dj: Corrige la fuga de referencia de cxl_nvb en caso de error. Gregory (kreview-0811365) ]

公表日 2026年3月25日20:16
登録日 2026年4月27日12:18
最終更新日 2026年4月25日3:08
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.14.1 6.18.17
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 6.19.7
cpe:2.3:o:linux:linux_kernel:5.14:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧