{"id":"CVE-2026-142866","summary":"md/raid5: fix NULL pointer dereference in raid5_free_percpu","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: fix NULL pointer dereference in raid5_free_percpu\n\nIf cpuhp_state_add_instance() fails in raid5_alloc_percpu() (e.g., the\nstartup callback raid456_cpu_up_prepare fails due to an allocation\nfailure), conf-\u003enode is never added to the cpuhp instance list and\nits pprev remains NULL (from kzalloc initialization).\n\nWhen setup_conf() then jumps to abort, free_conf() calls\nraid5_free_percpu(), which checks conf-\u003epercpu (non-NULL, since it was\nallocated before the cpuhp failure) and proceeds to call\ncpuhp_state_remove_instance().  This calls hlist_del() on the unhashed\nnode, which dereferences node-\u003epprev (NULL), causing a kernel panic.\n\nGuard the removal with hlist_unhashed_lockless() so that the cpuhp\ninstance is only removed if it was actually added.  The lockless variant\nuses READ_ONCE() for the pprev read, which is safe here because the\nactual removal is synchronized by cpuhp_state_mutex inside\ncpuhp_state_remove_instance().","modified":"2026-12-03T21:02:29.017122362Z","published":"2026-12-03T03:21:06.170Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142866.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/408363a4fa9e377b5c9aed07543ffff88a18a6e4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/41742e35268d6a45161b187f51f42bc2ade14d0d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/45ceac48961d92e1d056457a5690cd95d2f25450"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8b8435630e45636664fb9bb0da7f0822be955464"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9410f368f1b70a564950d714ba3b9b145eaa93dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b643d32dfd3cfeac237eb9795dc795f766181342"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d9128e169d36f8e57a55b2277022e596f9e13730"},{"type":"WEB","url":"https://git.kernel.org/stable/c/febe0bf350cbf38bb75241234aea2948b7f2eb90"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142866.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142866"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"29c6d1bbd7a2cd88a197ea7cef171f616e198526"},{"fixed":"408363a4fa9e377b5c9aed07543ffff88a18a6e4"},{"fixed":"d9128e169d36f8e57a55b2277022e596f9e13730"},{"fixed":"febe0bf350cbf38bb75241234aea2948b7f2eb90"},{"fixed":"b643d32dfd3cfeac237eb9795dc795f766181342"},{"fixed":"9410f368f1b70a564950d714ba3b9b145eaa93dd"},{"fixed":"45ceac48961d92e1d056457a5690cd95d2f25450"},{"fixed":"8b8435630e45636664fb9bb0da7f0822be955464"},{"fixed":"41742e35268d6a45161b187f51f42bc2ade14d0d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142866.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.9.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142866.json"}}],"schema_version":"1.9.2"}