md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ee37d7314a32ab6809eacc3389bad0406c69a81f · < 144c7fd008e0072b0b565f1157eec618de54ca8a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request
There are two check of 'mreplace' in raid10_sync_request(). In the first check, 'need_replace' will be set and 'mreplace' will be used later if no-Faulty 'mreplace' exists, In the second check, 'mreplace' will be set to NULL if it is Faulty, but 'need_replace' will not be changed accordingly. null-ptr-deref occurs if Faulty is set between two check.
Fix it by merging two checks into one. And replace 'need_replace' with 'mreplace' because their values are always the same.
From the CVE record · Linux
A race between two checks of `mreplace` in the Linux kernel’s `raid10_sync_request()` can cause a null-pointer dereference if `mreplace` becomes Faulty between the checks. The input does not specify an attacker path, access requirements, or user-interaction requirements.
Engineers running the Linux kernel with md/raid10 should check their installations; affected versions are not specified.