CVE-2026-139680: md/raid5: setup_conf: Fix null-ptr-def in error handling path
In the Linux kernel, the following vulnerability has been resolved:
md/raid5: setupconf: Fix null-ptr-def in error handling path
For raid5 setupconf, if an error(eg. biosetinit fails) happens before 'conf->mddev = mddev', following error handling path could trigger a null-ptr-def problem:
freeconf logexit raid5hasppl testbit(MDHASPPL, &conf->mddev->flags) // conf->mddev is NULL !
Fix it by initializing conf->mddev in advance.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In raid5 setup_conf, initialize conf->mddev in advance so error handling cannot reach raid5_has_ppl with conf->mddev set to NULL.
Event History
Frequently Asked Questions
When can this flaw be triggered?
It can be triggered when RAID5 setup encounters an error before setup_conf assigns conf->mddev, such as a bioset_init failure. The subsequent error-cleanup path dereferences conf->mddev even though it is NULL.
What systems are exposed?
Systems using the Linux kernel RAID5 setup path may be exposed when RAID5 configuration initialization fails. The provided information does not identify affected kernel versions or distributions.
What is the impact of a failed RAID5 initialization on an affected kernel?
The error-handling path can cause a null-pointer dereference, which may result in a kernel fault or denial of service during RAID5 setup.
What does the fix change?
The fix initializes conf->mddev before operations that can fail, so cleanup code can safely test the MD_HAS_PPL flag if setup later aborts.