# CVE-2024-36013: Bluetooth: L2CAP: Fix slab-use-after-free in l2cap\_connect()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.69% (percentile 48, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-05-23T07:03:07.571Z
- **Modified:** 2026-08-05T11:31:36.021Z

## Who should check

- Anyone running Linux \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 8629a65a48890769c47ebc9b6e57c02a80a8975e; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 826af9d2f69567c646ff46d10393d47e30ad23c6; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 4d7b41c0e43995b0e992b9f8903109275744b658
- Anyone running Linux 3.0

## Description

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

## Affected and fixed versions

- Linux: \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 8629a65a48890769c47ebc9b6e57c02a80a8975e; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 826af9d2f69567c646ff46d10393d47e30ad23c6; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 4d7b41c0e43995b0e992b9f8903109275744b658 (cvelist)
- Linux: 3.0 (cvelist)

## Mitigation

- Upgrade Linux to 4d7b41c0e43995b0e992b9f8903109275744b658 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-36013. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-36013.md
Affected: Linux >= 73ffa904b78287f6acf8797e040150aa26a4af4a, < 8629a65a48890769c47ebc9b6e57c02a80a8975e; >= 73ffa904b78287f6acf8797e040150aa26a4af4a, < cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5; >= 73ffa904b78287f6acf8797e040150aa26a4af4a, < 826af9d2f69567c646ff46d10393d47e30ad23c6; >= 73ffa904b78287f6acf8797…
Fixed in: Linux 8629a65a48890769c47ebc9b6e57c02a80a8975e, Linux 826af9d2f69567c646ff46d10393d47e30ad23c6, Linux 4d7b41c0e43995b0e992b9f8903109275744b658

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-36013 being exploited?

There is no confirmed exploitation: CVE-2024-36013 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-36013?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-36013?

Linux \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 8629a65a48890769c47ebc9b6e57c02a80a8975e; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 826af9d2f69567c646ff46d10393d47e30ad23c6; \>= 73ffa904b78287f6acf8797e040150aa26a4af4a, \< 4d7b41c0e43995b0e992b9f8903109275744b658; Linux 3.0.

### Is there a fix for CVE-2024-36013?

Yes. Fixed in Linux 8629a65a48890769c47ebc9b6e57c02a80a8975e, Linux 826af9d2f69567c646ff46d10393d47e30ad23c6, Linux 4d7b41c0e43995b0e992b9f8903109275744b658. Upgrade Linux to 4d7b41c0e43995b0e992b9f8903109275744b658 or later.

### How do I check if I'm affected by CVE-2024-36013?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/cfe560c7050bfb37b0d2491bbe7cd8b59e77fdc5>
- patch: <https://git.kernel.org/stable/c/826af9d2f69567c646ff46d10393d47e30ad23c6>
- patch: <https://git.kernel.org/stable/c/4d7b41c0e43995b0e992b9f8903109275744b658>
- other: <https://git.kernel.org/stable/c/8629a65a48890769c47ebc9b6e57c02a80a8975e>
- other: <http://www.openwall.com/lists/oss-security/2024/05/30/2>
- other: <http://www.openwall.com/lists/oss-security/2024/05/30/1>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-36013>

HTML: <https://flawdb.com/CVE-2024-36013> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-36013>
