CVE-2022-50715
NULL Pointer Dereference in Linux md/raid1 Causes Kernel Oops
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 5.10.146 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs in the Linux kernel's md/raid1 subsystem. When a RAID1 array fails to run because it is assembled with only an inactive disk, the mdx_raid1 thread is not stopped even though the associated resources have been released. This leads to a NULL pointer dereference during system poweroff, causing a kernel crash (Oops). The issue arises because the md_unregister_thread() function is not called before raid1_free() when the RAID1 array run fails.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to crash (kernel NULL pointer dereference) during system poweroff if a RAID1 array is assembled incorrectly with only inactive disks. This can lead to system instability, unexpected shutdown failures, and potential data loss or corruption due to improper handling of RAID1 arrays.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring the system logs for kernel oops messages related to NULL pointer dereferences in the md/raid1 subsystem. Specifically, look for log entries similar to: 'BUG: kernel NULL pointer dereference, address: 0000000000000070' and call traces involving md_check_recovery, raid1d, and md_mod. You can use commands like 'dmesg | grep -i mdx_raid1' or 'journalctl -k | grep -i mdx_raid1' to find such kernel oops messages.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves ensuring that the mdx_raid1 kernel thread is properly stopped when a raid1 array fails to run, which is addressed by the fix that calls md_unregister_thread() before raid1_free(). Practically, this means updating the Linux kernel to a version that includes this fix to prevent the NULL pointer dereference during poweroff. Until then, avoid assembling raid1 arrays with only inactive disks to prevent triggering the issue.