CVE-2026-142866
md/raid5: fix NULL pointer dereference in raid5_free_percpu
Description
In the Linux kernel, the following vulnerability has been resolved: md/raid5: fix NULL pointer dereference in raid5_free_percpu If cpuhp_state_add_instance() fails in raid5_alloc_percpu() (e.g., the startup callback raid456_cpu_up_prepare fails due to an allocation failure), conf->node is never added to the cpuhp instance list and its pprev remains NULL (from kzalloc initialization). When setup_conf() then jumps to abort, free_conf() calls raid5_free_percpu(), which checks conf->percpu (non-NULL, since it was allocated before the cpuhp failure) and proceeds to call cpuhp_state_remove_instance(). This calls hlist_del() on the unhashed node, which dereferences node->pprev (NULL), causing a kernel panic. Guard the removal with hlist_unhashed_lockless() so that the cpuhp instance is only removed if it was actually added. The lockless variant uses READ_ONCE() for the pprev read, which is safe here because the actual removal is synchronized by cpuhp_state_mutex inside cpuhp_state_remove_instance().
INFO
Published Date :
Dec. 3, 2026, 4:18 a.m.
Last Modified :
Dec. 3, 2026, 4:18 a.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
- Guard cpuhp instance removal with hlist_unhashed_lockless().
- Ensure cpuhp instance is added before attempting removal.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-142866.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-142866 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-142866
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-142866 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-142866 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Dec. 03, 2026
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: md/raid5: fix NULL pointer dereference in raid5_free_percpu If cpuhp_state_add_instance() fails in raid5_alloc_percpu() (e.g., the startup callback raid456_cpu_up_prepare fails due to an allocation failure), conf->node is never added to the cpuhp instance list and its pprev remains NULL (from kzalloc initialization). When setup_conf() then jumps to abort, free_conf() calls raid5_free_percpu(), which checks conf->percpu (non-NULL, since it was allocated before the cpuhp failure) and proceeds to call cpuhp_state_remove_instance(). This calls hlist_del() on the unhashed node, which dereferences node->pprev (NULL), causing a kernel panic. Guard the removal with hlist_unhashed_lockless() so that the cpuhp instance is only removed if it was actually added. The lockless variant uses READ_ONCE() for the pprev read, which is safe here because the actual removal is synchronized by cpuhp_state_mutex inside cpuhp_state_remove_instance(). Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/142xxx/CVE-2026-142866.json">CVE-2026-142866</a> Added Reference https://git.kernel.org/stable/c/408363a4fa9e377b5c9aed07543ffff88a18a6e4 Added Reference https://git.kernel.org/stable/c/41742e35268d6a45161b187f51f42bc2ade14d0d Added Reference https://git.kernel.org/stable/c/45ceac48961d92e1d056457a5690cd95d2f25450 Added Reference https://git.kernel.org/stable/c/8b8435630e45636664fb9bb0da7f0822be955464 Added Reference https://git.kernel.org/stable/c/9410f368f1b70a564950d714ba3b9b145eaa93dd Added Reference https://git.kernel.org/stable/c/b643d32dfd3cfeac237eb9795dc795f766181342 Added Reference https://git.kernel.org/stable/c/d9128e169d36f8e57a55b2277022e596f9e13730 Added Reference https://git.kernel.org/stable/c/febe0bf350cbf38bb75241234aea2948b7f2eb90