From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD3F03B5820 for ; Wed, 25 Mar 2026 10:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434633; cv=none; b=Va9VIIEP83b00rzeYccqmlqEnLILVBZK1qItUxVcLB0meRRT39oTTwiaIlWu/Wxnqmk2BcUiPfyAZ5HX73mvdQuIBczqsf+z6lIEsQOr2quMMQZhRwIoZ769r34NnwrS1HyKtOnsTEhwyZnbEzW7Xj+vjcD+XRcM+0Ye/ujjn0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434633; c=relaxed/simple; bh=XgQgB+kpIZH4O80J6KHmxrdEPAKpKKMPlZpa+t+OxAs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CvkUU5kamAwlR69lCPwG0zEZ1h92dKRfKqsGIWRh1DwJrjOyMpVDssFMVqbq6LVV2BxSFa3nupwcnp6WfAklgu0h9wsT65/FIoWdeXDYkkK63R7l9ykPQuhsnAOkow+Qw28dN7Nzk8hNyEs2Y+FexcUwRMXN5nuyCsvkLz16EMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1kTQzM/h; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1kTQzM/h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62118C2BCB4; Wed, 25 Mar 2026 10:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434633; bh=XgQgB+kpIZH4O80J6KHmxrdEPAKpKKMPlZpa+t+OxAs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=1kTQzM/hXtHLHNFzYtnOSIAwYnQEDou4NajBJnFSVgpdrlfB72lVIadypWkRX6VFL OpThJ9hIUIJRRknJo5vzLici5pIJKgZ11lmXstrbzC41fGOaqQxiqNbPaZX3n0g/8x NQDhe800hmp3kJUbp78TZD8Ucw+5tlzVDdefsRxY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23348: cxl: Fix race of nvdimm_bus object when creating nvdimm objects Date: Wed, 25 Mar 2026 11:27:32 +0100 Message-ID: <2026032536-CVE-2026-23348-e792@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4174; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=brbRljR5sfRvuuOqrL8zGgCsQX0BhB29jpWeX3csisk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd8T0rdD6+klL5PtLKdmEzb8z5x/eFqvscqLjbdzc0 G1b76c96IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJdH9hmF/mGv7IVdHgdsW/ u293XhRlfC1+5TjDgvYSrX0TTYMvHA10f60W80BN22auCQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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] [ 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) ] The Linux kernel CVE team has assigned CVE-2026-23348 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 8fdcb1704f61a8fd9be0f3849a174d084def0666 and fixed in 6.18.17 with commit 5fc4e150c5ada5f7d20d8f9f1b351f10481fbdf7 Issue introduced in 5.14 with commit 8fdcb1704f61a8fd9be0f3849a174d084def0666 and fixed in 6.19.7 with commit 5b230daeee420833287cc77314439903e5312f10 Issue introduced in 5.14 with commit 8fdcb1704f61a8fd9be0f3849a174d084def0666 and fixed in 7.0-rc2 with commit 96a1fd0d84b17360840f344826897fa71049870e Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-23348 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/cxl/core/pmem.c drivers/cxl/cxl.h drivers/cxl/pmem.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/5fc4e150c5ada5f7d20d8f9f1b351f10481fbdf7 https://git.kernel.org/stable/c/5b230daeee420833287cc77314439903e5312f10 https://git.kernel.org/stable/c/96a1fd0d84b17360840f344826897fa71049870e