CVE-2024-58009

MEDIUM

Linux Kernel - NULL Pointer Dereference in Bluetooth L2CAP Socket Allocation

Title source: llm
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc A NULL sock pointer is passed into l2cap_sock_alloc() when it is called from l2cap_sock_new_connection_cb() and the error handling paths should also be aware of it. Seemingly a more elegant solution would be to swap bt_sock_alloc() and l2cap_chan_create() calls since they are not interdependent to that moment but then l2cap_chan_create() 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.

Scores

CVSS v3 5.5
EPSS 0.0019
EPSS Percentile 8.8%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

CWE
CWE-476
Status published
Products (32)
linux/Kernel < 5.4.291linux
linux/Kernel 5.11.0 - 5.15.179linux
linux/Kernel 5.16.0 - 6.1.129linux
linux/Kernel 5.5.0 - 5.10.235linux
linux/Kernel 6.13.0 - 6.13.3linux
linux/Kernel 6.2.0 - 6.6.78linux
linux/Kernel 6.7.0 - 6.12.14linux
Linux/Linux < 6.13
Linux/Linux 5.10.231 - 5.10.235
Linux/Linux 5.10.235 - 5.10.*
... and 22 more
Published Feb 27, 2025
Tracked Since Feb 18, 2026