CVE-2024-58009: Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-58009?
CVE-2024-58009 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2024-58009?
To fix CVE-2024-58009, update the Linux kernel to a version that includes the security patch addressing this vulnerability.
Which Linux kernel versions are affected by CVE-2024-58009?
CVE-2024-58009 affects various versions of the Linux kernel between 5.4.287 and 5.4.291, 5.10.231 and 5.10.235, 5.15.174 and 5.15.179, 6.1.120 and 6.1.129, 6.6.66 and 6.6.78, and 6.12.5 and 6.12.14.
What components are affected by CVE-2024-58009?
CVE-2024-58009 specifically affects the Bluetooth L2CAP functionality in the Linux kernel.
What is the impact of exploiting CVE-2024-58009?
Exploiting CVE-2024-58009 may lead to a denial of service in systems using the affected versions of the Linux kernel.