CVE-2024-39476
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
05/07/2024
Last modified:
08/07/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING<br />
<br />
Xiao reported that lvm2 test lvconvert-raid-takeover.sh can hang with<br />
small possibility, the root cause is exactly the same as commit<br />
bed9e27baf52 ("Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"")<br />
<br />
However, Dan reported another hang after that, and junxiao investigated<br />
the problem and found out that this is caused by plugged bio can&#39;t issue<br />
from raid5d().<br />
<br />
Current implementation in raid5d() has a weird dependence:<br />
<br />
1) md_check_recovery() from raid5d() must hold &#39;reconfig_mutex&#39; to clear<br />
MD_SB_CHANGE_PENDING;<br />
2) raid5d() handles IO in a deadloop, until all IO are issued;<br />
3) IO from raid5d() must wait for MD_SB_CHANGE_PENDING to be cleared;<br />
<br />
This behaviour is introduce before v2.6, and for consequence, if other<br />
context hold &#39;reconfig_mutex&#39;, and md_check_recovery() can&#39;t update<br />
super_block, then raid5d() will waste one cpu 100% by the deadloop, until<br />
&#39;reconfig_mutex&#39; is released.<br />
<br />
Refer to the implementation from raid1 and raid10, fix this problem by<br />
skipping issue IO if MD_SB_CHANGE_PENDING is still set after<br />
md_check_recovery(), daemon thread will be woken up when &#39;reconfig_mutex&#39;<br />
is released. Meanwhile, the hang problem will be fixed as well.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19 (including) | 4.19.316 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.4 (including) | 5.4.278 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.10 (including) | 5.10.219 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15 (including) | 5.15.161 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1 (including) | 6.1.94 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.34 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (including) | 6.9.5 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/098d54934814dd876963abfe751c3b1cf7fbe56a
- https://git.kernel.org/stable/c/151f66bb618d1fd0eeb84acb61b4a9fa5d8bb0fa
- https://git.kernel.org/stable/c/3f8d5e802d4cedd445f9a89be8c3fd2d0e99024b
- https://git.kernel.org/stable/c/634ba3c97ec413cb10681c7b196db43ee461ecf4
- https://git.kernel.org/stable/c/aa64464c8f4d2ab92f6d0b959a1e0767b829d787
- https://git.kernel.org/stable/c/b32aa95843cac6b12c2c014d40fca18aef24a347
- https://git.kernel.org/stable/c/cd2538e5af495b3c747e503db346470fc1ffc447
- https://git.kernel.org/stable/c/e332a12f65d8fed8cf63bedb4e9317bb872b9ac7



