CVE-2026-31399: nvdimm/bus: Fix potential use after free in asynchronous initialization
In the Linux kernel, the following vulnerability has been resolved:
nvdimm/bus: Fix potential use after free in asynchronous initialization
Dingisoul with KASAN reports a use after free if deviceadd() fails in ndasyncdeviceregister().
Commit b6eae0f61db2 ("libnvdimm: Hold reference on parent while scheduling async init") correctly added a reference on the parent device to be held until asynchronous initialization was complete. However, if deviceadd() results in an allocation failure the ref count of the device drops to 0 prior to the parent pointer being accessed. Thus resulting in use after free.
The bug bot AI correctly identified the fix. Save a reference to the parent pointer to be used to drop the parent reference regardless of the outcome of deviceadd().
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31399?
CVE-2026-31399 has a severity rating of high with a CVSS score of 7.8.
How do I fix CVE-2026-31399?
To fix CVE-2026-31399, update to the latest version of the Linux kernel that includes the patch for this vulnerability.
What type of vulnerability is CVE-2026-31399?
CVE-2026-31399 is classified as a Use After Free vulnerability.
How does CVE-2026-31399 affect the Linux kernel?
CVE-2026-31399 can lead to potential exploitation due to improper handling of device initialization in the Linux kernel.
When was CVE-2026-31399 published?
CVE-2026-31399 was published on April 3, 2026.