CVE-2026-31399
kernel: nvdimm/bus: Fix potential use after free in asynchronous initialization
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 3, 2026
Updated · June 28, 2026
Description
A flaw was found in the Linux kernel's nvdimm/bus component. During asynchronous device initialization, if the device_add() function fails in nd_async_device_register(), a use-after-free vulnerability can occur. This happens because the device's reference count drops to zero before the parent pointer is accessed, leading to memory corruption. A local attacker could potentially exploit this to cause system instability or execute arbitrary code.
Statement
This vulnerability affects systems with NVDIMM (Non-Volatile DIMM) persistent memory hardware. The issue only manifests during an unlikely error path when device_add() fails due to allocation failure during asynchronous initialization. Systems without NVDIMM hardware are not affected, and the error condition is rare under normal memory conditions.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.7CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-911 · Improper Update of Reference Count