Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-56605 Overview
CVE-2024-56605 is a use-after-free vulnerability in the Linux kernel's Bluetooth Logical Link Control and Adaptation Protocol (L2CAP) subsystem. The flaw resides in the l2cap_sock_create() function, where bt_sock_alloc() attaches a newly allocated sk object to a sock object. On an error path, l2cap_sock_alloc() frees the sk object but leaves the dangling pointer attached to the sock object. Subsequent code paths that dereference this pointer can trigger memory corruption. The vulnerability is classified under [CWE-416: Use After Free] and affects multiple stable branches of the Linux kernel.
Critical Impact
A local, authenticated attacker can trigger memory corruption in the kernel Bluetooth stack, potentially leading to privilege escalation or denial of service on affected systems.
Affected Products
- Linux Kernel (multiple stable branches patched via upstream fixes)
- Debian Linux (addressed through Debian LTS security announcements)
- Any Linux distribution bundling the vulnerable net/bluetooth/l2cap_sock.c code prior to the patch commits
Discovery Timeline
- 2024-12-27 - CVE-2024-56605 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2024-56605
Vulnerability Analysis
The vulnerability resides in the Bluetooth L2CAP socket initialization code path in net/bluetooth/l2cap_sock.c. During socket creation, l2cap_sock_create() invokes l2cap_sock_alloc(), which in turn calls bt_sock_alloc() to allocate the sk (sock) structure and attach it to the parent sock object. If a later allocation or initialization step fails, l2cap_sock_alloc() frees the sk object, but the parent sock object retains the now-dangling pointer in its sk field.
Any subsequent code that dereferences sock->sk operates on freed memory. On systems where the attacker can reclaim the freed slab object with controlled data, this creates a path toward kernel memory corruption and potential arbitrary code execution in kernel context.
Root Cause
The root cause is incomplete error-path cleanup. l2cap_sock_alloc() releases the allocated sk object without clearing the sock->sk pointer. The caller then treats the sock object as if it were safely torn down, leaving a dangling reference that other kernel code can later access.
Attack Vector
Exploitation requires local access with the ability to open Bluetooth L2CAP sockets. The attacker triggers the error path during socket creation and then races to reclaim the freed slab object with attacker-controlled content before a subsequent dereference of sock->sk occurs. Successful exploitation yields corruption of kernel memory within the Bluetooth subsystem.
No verified public proof-of-concept code is available at this time. Technical remediation details are documented in the upstream kernel commits, including Kernel Git Commit 61686abc and Kernel Git Commit f6ad6416.
Detection Methods for CVE-2024-56605
Indicators of Compromise
- Unexpected kernel oops, panic, or KASAN: use-after-free warnings referencing l2cap_sock_create or bt_sock_alloc in dmesg or /var/log/kern.log
- Unexplained crashes or instability in the Bluetooth subsystem following socket creation activity by unprivileged processes
- Loading of the bluetooth or l2cap kernel modules on systems where Bluetooth is not operationally required
Detection Strategies
- Audit installed kernel package versions against the fixed versions referenced in the upstream commits and the Debian LTS Security Announcement
- Enable Kernel Address Sanitizer (KASAN) in test environments to surface use-after-free conditions in the Bluetooth stack
- Monitor auditd for unexpected socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP, ...) calls from unprivileged users
Monitoring Recommendations
- Collect kernel ring buffer messages centrally and alert on warnings containing l2cap_sock, bt_sock_alloc, or use-after-free
- Track Bluetooth kernel module load events on servers and workstations where Bluetooth is not expected
- Correlate crashes in the Bluetooth subsystem with the executing user and process to identify potential exploitation attempts
How to Mitigate CVE-2024-56605
Immediate Actions Required
- Apply the latest kernel updates from your Linux distribution vendor that incorporate the upstream fix commits
- On Debian systems, install the kernel package updates referenced in the Debian LTS Security Announcement 1 and Debian LTS Security Announcement 2
- Reboot after patching to activate the fixed kernel image
Patch Information
The upstream fix clears the dangling sk pointer on the error path in l2cap_sock_create(). Fix commits are available at Kernel Git Commit 61686abc, Kernel Git Commit 7c4f78cd, Kernel Git Commit 8ad09ddc, Kernel Git Commit a8677028, Kernel Git Commit bb2f2342, Kernel Git Commit daa13175, and Kernel Git Commit f6ad6416.
Workarounds
- Blacklist the Bluetooth kernel modules on systems that do not require Bluetooth connectivity to remove the vulnerable attack surface
- Restrict access to Bluetooth sockets by removing unprivileged users from groups that permit Bluetooth usage
- Disable the Bluetooth service (systemctl disable --now bluetooth) where operationally feasible until the kernel is patched
# Configuration example: blacklist Bluetooth modules on systems that do not need Bluetooth
echo "blacklist bluetooth" | sudo tee /etc/modprobe.d/blacklist-bluetooth.conf
echo "blacklist btusb" | sudo tee -a /etc/modprobe.d/blacklist-bluetooth.conf
echo "install bluetooth /bin/true" | sudo tee -a /etc/modprobe.d/blacklist-bluetooth.conf
# Disable and stop the Bluetooth service
sudo systemctl disable --now bluetooth
# Verify the l2cap module is not loaded
lsmod | grep -E 'bluetooth|l2cap'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

