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-35965 Overview
CVE-2024-35965 is a Linux kernel vulnerability in the Bluetooth Logical Link Control and Adaptation Protocol (L2CAP) implementation. The flaw stems from missing user input length validation in the setsockopt handler before copying data from userspace. A local, authenticated attacker can trigger the issue by issuing a crafted setsockopt call on an L2CAP socket. Exploitation can lead to confidentiality loss and denial of service on affected kernels. The issue is classified under [CWE-1284] (Improper Validation of Specified Quantity in Input).
Critical Impact
A local attacker with low privileges can trigger out-of-bounds memory access through an L2CAP socket option, potentially disclosing kernel memory and crashing the system.
Affected Products
- Linux kernel 6.9-rc1
- Linux kernel 6.9-rc2
- Linux kernel 6.9-rc3
- Earlier Linux kernel branches backported to via stable updates
Discovery Timeline
- 2024-05-20 - CVE-2024-35965 published to the National Vulnerability Database (NVD)
- 2025-03 - Debian LTS Announcement March 2025 addresses the issue
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2024-35965
Vulnerability Analysis
The vulnerability resides in the Linux kernel Bluetooth L2CAP subsystem. The setsockopt handler accepted user-supplied option data without verifying that the provided length matched the expected size before copying it into kernel memory. When a userspace process supplies a shorter buffer than the kernel reads, the copy operation accesses uninitialized or adjacent memory. This leads to an out-of-bounds read that can leak kernel data or destabilize kernel structures, resulting in confidentiality loss and system crashes.
Root Cause
The root cause is improper input validation [CWE-1284] in the L2CAP setsockopt path. The handler trusted the length argument supplied by userspace and proceeded to copy_from_user without a prior bounds check. The upstream fix adds explicit validation of the user input length before any data copy occurs. Reference commits include 28234f8a, 4f395124, 8ee0c132, 9d42f373, and f13b04cf in the stable kernel tree.
Attack Vector
Exploitation requires local access and a low-privileged user account capable of opening a Bluetooth L2CAP socket. The attacker invokes setsockopt on the socket with a crafted option length that under-sizes the user buffer. No user interaction is required. Successful exploitation yields high impact to confidentiality and availability but does not directly compromise integrity.
No verified public proof-of-concept code is available. See the upstream patch commits linked in the Linux stable tree for the exact code paths involved.
Detection Methods for CVE-2024-35965
Indicators of Compromise
- Unexpected kernel oops or panic traces referencing L2CAP functions in dmesg or /var/log/kern.log
- Processes repeatedly invoking setsockopt on AF_BLUETOOTH sockets with unusual option length values
- Local user processes loading or interacting with Bluetooth protocol family sockets outside normal application behavior
Detection Strategies
- Audit running kernel versions against the fixed releases listed in the Debian LTS announcement and Siemens Security Advisory SSA-265688
- Use auditd rules to log setsockopt syscalls targeting Bluetooth sockets and alert on anomalous length arguments
- Correlate kernel crash telemetry with recently executed Bluetooth-related binaries to identify exploitation attempts
Monitoring Recommendations
- Forward kernel ring buffer and syslog events to a centralized log platform for review of L2CAP-related warnings
- Monitor local privilege escalation telemetry on Linux endpoints and servers with Bluetooth stacks enabled
- Track package update status for linux-image-* across the fleet to confirm patched kernels are deployed and booted
How to Mitigate CVE-2024-35965
Immediate Actions Required
- Apply the latest kernel updates from your distribution, prioritizing systems where untrusted local users can execute code
- Disable the Bluetooth stack on servers and workstations that do not require it, using systemctl disable --now bluetooth and blacklisting the bluetooth and btusb modules
- Restrict access to AF_BLUETOOTH sockets via seccomp or Linux Security Modules where feasible
Patch Information
Upstream fixes are available in the Linux stable tree under commits 28234f8a, 4f395124, 8ee0c132, 9d42f373, and f13b04cf. Distribution updates include the Debian LTS Announcement March 2025 and vendor firmware updates referenced in Siemens Security Advisory SSA-265688.
Workarounds
- Unload the Bluetooth kernel modules on systems that do not require wireless connectivity: modprobe -r bnep btusb bluetooth
- Add blacklist bluetooth and blacklist btusb entries under /etc/modprobe.d/ to prevent reload after reboot
- Restrict local shell access and enforce least privilege on multi-user systems until the patched kernel is deployed and booted
# Configuration example
# Disable and prevent reload of the Bluetooth stack
sudo systemctl disable --now bluetooth
echo 'install bluetooth /bin/true' | sudo tee /etc/modprobe.d/disable-bluetooth.conf
echo 'install btusb /bin/true' | sudo tee -a /etc/modprobe.d/disable-bluetooth.conf
sudo modprobe -r btusb bluetooth || true
# Verify running kernel version post-patch
uname -r
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

