CVE-2024-58009

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-58009
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-58009.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-58009
Downstream
Related
Published
2025-02-27T02:12:04Z
Modified
2025-10-10T07:09:20.459934Z
Summary
Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc
Details

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

Bluetooth: L2CAP: handle NULL sock pointer in l2capsockalloc

A NULL sock pointer is passed into l2capsockalloc() when it is called from l2capsocknewconnectioncb() and the error handling paths should also be aware of it.

Seemingly a more elegant solution would be to swap btsockalloc() and l2capchancreate() calls since they are not interdependent to that moment but then l2capchancreate() adds the soon to be deallocated and still dummy-initialized channel to the global list accessible by many L2CAP paths. The channel would be removed from the list in short period of time but be a bit more straight-forward here and just check for NULL instead of changing the order of function calls.

Found by Linux Verification Center (linuxtesting.org) with SVACE static analysis tool.

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
f6ad641646b67f29c7578dcd6c25813c7dcbf51e
Fixed
a9a7672fc1a0fe18502493936ccb06413ab89ea6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
daa13175a6dea312a76099066cb4cbd4fc959a84
Fixed
8e605f580a97530e5a3583beea458a3fa4cbefbd
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a8677028dd5123e5e525b8195483994d87123de4
Fixed
cf601a24120c674cd7c907ea695f92617af6abd0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
bb2f2342a6ddf7c04f9aefbbfe86104cd138e629
Fixed
297ce7f544aa675b0d136d788cad0710cdfb0785
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8ad09ddc63ace3950ac43db6fbfe25b40f589dd6
Fixed
245d48c1ba3e7a1779c2f4cbc6f581ddc8a78e22
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
61686abc2f3c2c67822aa23ce6f160467ec83d35
Fixed
691218a50c3139f7f57ffa79fb89d932eda9571e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7c4f78cdb8e7501e9f92d291a7d956591bf73be9
Fixed
49c0d55d59662430f1829ae85b969619573d0fa1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7c4f78cdb8e7501e9f92d291a7d956591bf73be9
Fixed
5f397409f8ee5bc82901eeaf799e1cbc4f8edcf1

Affected versions

v5.*

v5.10.231
v5.10.232
v5.10.233
v5.10.234
v5.15.174
v5.15.175
v5.15.176
v5.15.177
v5.15.178
v5.4.287
v5.4.288
v5.4.289
v5.4.290

v6.*

v6.1.120
v6.1.121
v6.1.122
v6.1.123
v6.1.124
v6.1.125
v6.1.126
v6.1.127
v6.1.128
v6.12
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.10
v6.12.11
v6.12.12
v6.12.13
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.13.1
v6.13.2
v6.6.66
v6.6.67
v6.6.68
v6.6.69
v6.6.70
v6.6.71
v6.6.72
v6.6.73
v6.6.74
v6.6.75
v6.6.76
v6.6.77

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.4.291
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.235
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.179
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.129
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.78
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.14
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.3