CVE-2024-39296
Severity CVSS v4.0:
Pending analysis
Type:
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
25/06/2024
Last modified:
17/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bonding: fix oops during rmmod<br />
<br />
"rmmod bonding" causes an oops ever since commit cc317ea3d927 ("bonding:<br />
remove redundant NULL check in debugfs function"). Here are the relevant<br />
functions being called:<br />
<br />
bonding_exit()<br />
bond_destroy_debugfs()<br />
debugfs_remove_recursive(bonding_debug_root);<br />
bonding_debug_root = NULL; OOPS<br />
<br />
However, reverting the bad commit does not solve the problem completely<br />
because the original code contains a race that could cause the same<br />
oops, although it was much less likely to be triggered unintentionally:<br />
<br />
CPU1<br />
rmmod bonding<br />
bonding_exit()<br />
bond_destroy_debugfs()<br />
debugfs_remove_recursive(bonding_debug_root);<br />
<br />
CPU2<br />
echo -bond0 > /sys/class/net/bonding_masters<br />
bond_uninit()<br />
bond_debug_unregister()<br />
if (!bonding_debug_root)<br />
<br />
CPU1<br />
bonding_debug_root = NULL;<br />
<br />
So do NOT revert the bad commit (since the removed checks were racy<br />
anyway), and instead change the order of actions taken during module<br />
removal. The same oops can also happen if there is an error during<br />
module init, so apply the same fix there.
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.34 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (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/a45835a0bb6ef7d5ddbc0714dd760de979cb6ece
- https://git.kernel.org/stable/c/cf48aee81103ca06d09d73d33fb72f1191069aa6
- https://git.kernel.org/stable/c/f07224c16678a8af54ddc059b3d2d51885d7f35e
- https://git.kernel.org/stable/c/a45835a0bb6ef7d5ddbc0714dd760de979cb6ece
- https://git.kernel.org/stable/c/cf48aee81103ca06d09d73d33fb72f1191069aa6
- https://git.kernel.org/stable/c/f07224c16678a8af54ddc059b3d2d51885d7f35e



