CVE-2024-36013: Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect()
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect()
Extend a critical section to prevent chan from early freeing.
Also make the l2cap_connect() return type void. Nothing is using the
returned value but it is ugly to return a potentially freed pointer.
Making it void will help with backports because earlier kernels did use
the return value. Now the compile will break for kernels where this
patch is not a complete fix.
Call stack summary:
[use]
l2cap_bredr_sig_cmd
l2cap_connect
┌ mutex_lock(&conn->chan_lock);
│ chan = pchan->ops->new_connection(pchan); <- alloc chan
│ __l2cap_chan_add(conn, chan);
│ l2cap_chan_hold(chan);
│ list_add(&chan->list, &conn->chan_l); ... (1)
└ mutex_unlock(&conn->chan_lock);
chan->conf_state ... (4) <- use after free
[free]
l2cap_conn_del
┌ mutex_lock(&conn->chan_lock);
│ foreach chan in conn->chan_l: ... (2)
│ l2cap_chan_put(chan);
│ l2cap_chan_destroy
│ kfree(chan) ... (3) <- chan freed
└ mutex_unlock(&conn->chan_lock);
==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read
include/linux/instrumented.h:68 [inline]
BUG: KASAN: slab-use-after-free in _test_bit
include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: slab-use-after-free in l2cap_connect+0xa67/0x11a0
net/bluetooth/l2cap_core.c:4260
Read of size 8 at addr ffff88810bf040a0 by task kworker/u3:1/311
Security readout for executives and security teams
Plain-English summary
A race condition in the Linux Bluetooth L2CAP code can access memory after it has been freed. A nearby, unauthenticated Bluetooth peer may be able to trigger serious confidentiality, integrity, or availability impact. The supplied sources confirm a kernel fix but do not establish real-world exploitation.
Executive priority
Treat this as a high-priority patching issue for Bluetooth-capable Linux endpoints in public, shared, industrial, or otherwise untrusted physical environments. Prioritize confirmed Bluetooth exposure first. Broader emergency response is not supported because the supplied evidence does not show active exploitation.
Technical view
CVE-2024-36013 is a CWE-416 slab use-after-free in l2cap_connect(). l2cap_conn_del() could free a channel after its insertion into the connection list but before later access to chan->conf_state. The fix extends the chan_lock critical section and changes l2cap_connect() to return void, helping expose incomplete backports at compile time.
Likely exposure
Exposure primarily concerns Linux systems using affected kernel builds with Bluetooth and L2CAP available to nearby devices. The CVSS adjacent-network vector limits reach compared with an Internet-routable flaw. The supplied affected-version list lacks sufficient range semantics, so distribution-specific kernel advisories should determine exposure.
Exploitation context
The CVSS 3.1 score is 8.8 with adjacent access, low complexity, no privileges, and no user interaction. CISA KEV status is false in the supplied bundle, and no cited source reports active exploitation or a public exploit. Practical exploitability beyond the documented KASAN crash is not established here.
Researcher notes
The documented race spans channel creation and connection teardown. KASAN observed an eight-byte read after l2cap_chan_destroy() freed the channel. The lock-scope change is the substantive correction; the void return type supports safer backport verification. Exact affected release boundaries cannot be reconstructed confidently from the flattened version data supplied.
Mitigation direction
Update to a vendor-supported kernel incorporating the applicable cited stable fix.
Check distribution guidance to map packaged kernel versions to the upstream fix.
Prioritize systems with enabled Bluetooth interfaces or exposure to untrusted nearby devices.
Reboot into the corrected kernel when required by the operating-system vendor.
Validation and detection
Inventory running kernel and distribution package versions across Linux systems.
Identify systems where Bluetooth hardware, services, and L2CAP are available.
Compare each build with vendor advisories and the cited stable commits.
After remediation, confirm the corrected kernel is running.
Review Bluetooth-related kernel crashes or memory-safety alerts for possible prior triggering.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
2ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.