# CVE-2025-39860: Bluetooth: Fix use-after-free in l2cap\_sock\_cleanup\_listen()

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

- **Severity:** HIGH 8.0
- **CVSS:** 8.0 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: Low; 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.37% (percentile 23, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-19T15:26:30.767Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= a2da00d1ea1abfb04f846638e210b5b5166e3c9c, \< 964cbb198f9c46c2b2358cd1faffc04c1e8248cf; \>= 06f87c96216bc5cd1094c23492274f77f1d5dd3b, \< 83e1d9892ef51785cf0760b7681436760dda435a; \>= fbe5a2fed8156cc19eb3b956602b0a1dd46a302d, \< 47f6090bcf75c369695d21c3f179db8a56bbbd49; \>= 29fac18499332211b2615ade356e2bd8b3269f98, \< 2ca99fc3512a8074de20ee52a87b492dfcc41a4d; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 6077d16b5c0f65d571eee709de2f0541fb5ef0ca; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 306b0991413b482dbf5585b423022123bb505966; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 3dff390f55ccd9ce12e91233849769b5312180c2; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 862c628108562d8c7a516a900034823b381d3cba; 51822644a047eac2310fab0799b64e3430b5a111; 82cdb2ccbe43337798393369f0ceb98699fe6037; …
- Anyone running Linux 6.5

## Description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: Fix use-after-free in l2cap\_sock\_cleanup\_listen()

syzbot reported the splat below without a repro.

In the splat, a single thread calling bt\_accept\_dequeue() freed sk
and touched it after that.

The root cause would be the racy l2cap\_sock\_cleanup\_listen() call
added by the cited commit.

bt\_accept\_dequeue() is called under lock\_sock() except for
l2cap\_sock\_release().

Two threads could see the same socket during the list iteration
in bt\_accept\_dequeue():

  CPU1                        CPU2 (close())
  ----                        ----
  sock\_hold(sk)               sock\_hold(sk);
  lock\_sock(sk)   \<-- block close()
  sock\_put(sk)
  bt\_accept\_unlink(sk)
    sock\_put(sk)  \<-- refcnt by bt\_accept\_enqueue()
  release\_sock(sk)
                              lock\_sock(sk)
                              sock\_put(sk)
                              bt\_accept\_unlink(sk)
                                sock\_put(sk)        \<-- last refcnt
                              bt\_accept\_unlink(sk)  \<-- UAF

Depending on the timing, the other thread could show up in the
"Freed by task" part.

Let's call l2cap\_sock\_cleanup\_listen() under lock\_sock() in
l2cap\_sock\_release().

\[0\]:
BUG: KASAN: slab-use-after-free in debug\_spin\_lock\_before kernel/locking/spinlock\_debug.c:86 \[inline\]
BUG: KASAN: slab-use-after-free in do\_raw\_spin\_lock+0x26f/0x2b0 kernel/locking/spinlock\_debug.c:115
Read of size 4 at addr ffff88803b7eb1c4 by task syz.5.3276/16995
CPU: 3 UID: 0 PID: 16995 Comm: syz.5.3276 Not tainted syzkaller \#0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
 dump\_stack\_lvl+0x116/0x1f0 lib/dump\_stack.c:120
 print\_address\_description mm/kasan/report.c:378 \[inline\]
 print\_report+0xcd/0x630 mm/kasan/report.c:482
 kasan\_report+0xe0/0x110 mm/kasan/report.c:595
 debug\_spin\_lock\_before kernel/locking/spinlock\_debug.c:86 \[inline\]
 do\_raw\_spin\_lock+0x26f/0x2b0 kernel/locking/spinlock\_debug.c:115
 spin\_lock\_bh include/linux/spinlock.h:356 \[inline\]
 release\_sock+0x21/0x220 net/core/sock.c:3746
 bt\_accept\_dequeue+0x505/0x600 net/bluetooth/af\_bluetooth.c:312
 l2cap\_sock\_cleanup\_listen+0x5c/0x2a0 net/bluetooth/l2cap\_sock.c:1451
 l2cap\_sock\_release+0x5c/0x210 net/bluetooth/l2cap\_sock.c:1425
 \_\_sock\_release+0xb3/0x270 net/socket.c:649
 sock\_close+0x1c/0x30 net/socket.c:1439
 \_\_fput+0x3ff/0xb70 fs/file\_table.c:468
 task\_work\_run+0x14d/0x240 kernel/task\_work.c:227
 resume\_user\_mode\_work include/linux/resume\_user\_mode.h:50 \[inline\]
 exit\_to\_user\_mode\_loop+0xeb/0x110 kernel/entry/common.c:43
 exit\_to\_user\_mode\_prepare include/linux/irq-entry-common.h:225 \[inline\]
 syscall\_exit\_to\_user\_mode\_work include/linux/entry-common.h:175 \[inline\]
 syscall\_exit\_to\_user\_mode include/linux/entry-common.h:210 \[inline\]
 do\_syscall\_64+0x3f6/0x4c0 arch/x86/entry/syscall\_64.c:100
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
RIP: 0033:0x7f2accf8ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb6cb1378 EFLAGS: 00000246 ORIG\_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00000000000426fb RCX: 00007f2accf8ebe9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f2acd1b7da0 R08: 0000000000000001 R09: 00000012b6cb166f
R10: 0000001b30e20000 R11: 0000000000000246 R12: 00007f2acd1b609c
R13: 00007f2acd1b6090 R14: ffffffffffffffff R15: 00007ffdb6cb1490
 \</TASK\>

Allocated by task 5326:
 kasan\_save\_stack+0x33/0x60 mm/kasan/common.c:47
 kasan\_save\_track+0x14/0x30 mm/kasan/common.c:68
 poison\_kmalloc\_redzone mm/kasan/common.c:388 \[inline\]
 \_\_kasan\_kmalloc+0xaa/0xb0 mm/kasan/common.c:405
 kasan\_kmalloc include/linux/kasan.h:260 \[inline\]
 \_\_do\_kmalloc\_node mm/slub.c:4365 \[inline\]
 \_\_kmalloc\_nopro
---truncated---

## Affected and fixed versions

- Linux: \>= a2da00d1ea1abfb04f846638e210b5b5166e3c9c, \< 964cbb198f9c46c2b2358cd1faffc04c1e8248cf; \>= 06f87c96216bc5cd1094c23492274f77f1d5dd3b, \< 83e1d9892ef51785cf0760b7681436760dda435a; \>= fbe5a2fed8156cc19eb3b956602b0a1dd46a302d, \< 47f6090bcf75c369695d21c3f179db8a56bbbd49; \>= 29fac18499332211b2615ade356e2bd8b3269f98, \< 2ca99fc3512a8074de20ee52a87b492dfcc41a4d; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 6077d16b5c0f65d571eee709de2f0541fb5ef0ca; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 306b0991413b482dbf5585b423022123bb505966; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 3dff390f55ccd9ce12e91233849769b5312180c2; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 862c628108562d8c7a516a900034823b381d3cba; 51822644a047eac2310fab0799b64e3430b5a111; 82cdb2ccbe43337798393369f0ceb98699fe6037; … (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39860.md
Affected: Linux >= a2da00d1ea1abfb04f846638e210b5b5166e3c9c, < 964cbb198f9c46c2b2358cd1faffc04c1e8248cf; >= 06f87c96216bc5cd1094c23492274f77f1d5dd3b, < 83e1d9892ef51785cf0760b7681436760dda435a; >= fbe5a2fed8156cc19eb3b956602b0a1dd46a302d, < 47f6090bcf75c369695d21c3f179db8a56bbbd49; >= 29fac18499332211b2615ad…
Fixed in: Linux 964cbb198f9c46c2b2358cd1faffc04c1e8248cf, Linux 83e1d9892ef51785cf0760b7681436760dda435a, Linux 47f6090bcf75c369695d21c3f179db8a56bbbd49, Linux 2ca99fc3512a8074de20ee52a87b492dfcc41a4d, Linux 6077d16b5c0f65d571eee709de2f0541fb5ef0ca, Linux 306b0991413b482dbf5585b423022123bb505966, Linux 3dff3…

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-2025-39860 being exploited?

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

### How serious is CVE-2025-39860?

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

### Which versions are affected by CVE-2025-39860?

Linux \>= a2da00d1ea1abfb04f846638e210b5b5166e3c9c, \< 964cbb198f9c46c2b2358cd1faffc04c1e8248cf; \>= 06f87c96216bc5cd1094c23492274f77f1d5dd3b, \< 83e1d9892ef51785cf0760b7681436760dda435a; \>= fbe5a2fed8156cc19eb3b956602b0a1dd46a302d, \< 47f6090bcf75c369695d21c3f179db8a56bbbd49; \>= 29fac18499332211b2615ade356e2bd8b3269f98, \< 2ca99fc3512a8074de20ee52a87b492dfcc41a4d; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 6077d16b5c0f65d571eee709de2f0541fb5ef0ca; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 306b0991413b482dbf5585b423022123bb505966; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 3dff390f55ccd9ce12e91233849769b5312180c2; \>= 1728137b33c00d5a2b5110ed7aafb42e7c32e4a1, \< 862c628108562d8c7a516a900034823b381d3cba; 51822644a047eac2310fab0799b64e3430b5a111; 82cdb2ccbe43337798393369f0ceb98699fe6037; …; Linux 6.5.

### Is there a fix for CVE-2025-39860?

Yes. Fixed in Linux 964cbb198f9c46c2b2358cd1faffc04c1e8248cf, Linux 83e1d9892ef51785cf0760b7681436760dda435a, Linux 47f6090bcf75c369695d21c3f179db8a56bbbd49, Linux 2ca99fc3512a8074de20ee52a87b492dfcc41a4d, Linux 6077d16b5c0f65d571eee709de2f0541fb5ef0ca, Linux 306b0991413b482dbf5585b423022123bb505966, Linux 3dff390f55ccd9ce12e91233849769b5312180c2, Linux 862c628108562d8c7a516a900034823b381d3cba. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-39860?

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/964cbb198f9c46c2b2358cd1faffc04c1e8248cf>
- patch: <https://git.kernel.org/stable/c/83e1d9892ef51785cf0760b7681436760dda435a>
- patch: <https://git.kernel.org/stable/c/47f6090bcf75c369695d21c3f179db8a56bbbd49>
- patch: <https://git.kernel.org/stable/c/2ca99fc3512a8074de20ee52a87b492dfcc41a4d>
- patch: <https://git.kernel.org/stable/c/6077d16b5c0f65d571eee709de2f0541fb5ef0ca>
- patch: <https://git.kernel.org/stable/c/306b0991413b482dbf5585b423022123bb505966>
- patch: <https://git.kernel.org/stable/c/3dff390f55ccd9ce12e91233849769b5312180c2>
- patch: <https://git.kernel.org/stable/c/862c628108562d8c7a516a900034823b381d3cba>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-089022.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-032379.html>

## 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-2025-39860>

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