CVE-2024-39296

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-39296
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-39296.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-39296
Downstream
Related
Published
2024-06-25T14:22:40Z
Modified
2025-10-16T10:28:48.513930Z
Summary
bonding: fix oops during rmmod
Details

In the Linux kernel, the following vulnerability has been resolved:

bonding: fix oops during rmmod

"rmmod bonding" causes an oops ever since commit cc317ea3d927 ("bonding: remove redundant NULL check in debugfs function"). Here are the relevant functions being called:

bondingexit() bonddestroydebugfs() debugfsremoverecursive(bondingdebugroot); bondingdebugroot = NULL; <--------- SET TO NULL HERE bondnetlinkfini() rtnllinkunregister() _rtnllinkunregister() unregisternetdevicemanynotify() bonduninit() bonddebugunregister() (commit removed check for bondingdebugroot == NULL) debugfsremove() simplerecursiveremoval() downwrite() -> OOPS

However, reverting the bad commit does not solve the problem completely because the original code contains a race that could cause the same oops, although it was much less likely to be triggered unintentionally:

CPU1 rmmod bonding bondingexit() bonddestroydebugfs() debugfsremoverecursive(bondingdebug_root);

CPU2 echo -bond0 > /sys/class/net/bondingmasters bonduninit() bonddebugunregister() if (!bondingdebugroot)

CPU1 bondingdebugroot = NULL;

So do NOT revert the bad commit (since the removed checks were racy anyway), and instead change the order of actions taken during module removal. The same oops can also happen if there is an error during module init, so apply the same fix there.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cc317ea3d9272fab4f6fef527c865f30ca479394
Fixed
f07224c16678a8af54ddc059b3d2d51885d7f35e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cc317ea3d9272fab4f6fef527c865f30ca479394
Fixed
cf48aee81103ca06d09d73d33fb72f1191069aa6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cc317ea3d9272fab4f6fef527c865f30ca479394
Fixed
a45835a0bb6ef7d5ddbc0714dd760de979cb6ece

Affected versions

v6.*

v6.5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7
v6.9.1
v6.9.2
v6.9.3
v6.9.4

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.34
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.5