# CVE-2025-38250: Bluetooth: hci\_core: Fix use-after-free in vhci\_flush()

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; 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.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-07-09T10:42:30.294Z
- **Modified:** 2026-10-15T22:18:36.813Z

## Who should check

- Anyone running Linux \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< dd4becd3fd4102696e1c15e6d260a1712a2d8685; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 90dee0a0ff84fac8accd5be98412b3819f667149; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< c56b177efce8b62798e4d96bdb9867106cb7c4a0; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< bc0819a25e04cd68ef3568cfa51b63118fea39a7; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< ce23b73f0f27e2dbeb81734a79db710f05aa33c6; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 0e5c144c557df910ab64d9c25d06399a9a735e65; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 1d6123102e9fbedc8d25bf4731da6d513173e49e
- Anyone running Linux 3.4

## Description

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

Bluetooth: hci\_core: Fix use-after-free in vhci\_flush()

syzbot reported use-after-free in vhci\_flush() without repro. \[0\]

From the splat, a thread close()d a vhci file descriptor while
its device was being used by iotcl() on another thread.

Once the last fd refcnt is released, vhci\_release() calls
hci\_unregister\_dev(), hci\_free\_dev(), and kfree() for struct
vhci\_data, which is set to hci\_dev-\>dev-\>driver\_data.

The problem is that there is no synchronisation after unlinking
hdev from hci\_dev\_list in hci\_unregister\_dev().  There might be
another thread still accessing the hdev which was fetched before
the unlink operation.

We can use SRCU for such synchronisation.

Let's run hci\_dev\_reset() under SRCU and wait for its completion
in hci\_unregister\_dev().

Another option would be to restore hci\_dev-\>destruct(), which was
removed in commit 587ae086f6e4 ("Bluetooth: Remove unused
hci-destruct cb").  However, this would not be a good solution, as
we should not run hci\_unregister\_dev() while there are in-flight
ioctl() requests, which could lead to another data-race KCSAN splat.

Note that other drivers seem to have the same problem, for exmaple,
virtbt\_remove().

\[0\]:
BUG: KASAN: slab-use-after-free in skb\_queue\_empty\_lockless include/linux/skbuff.h:1891 \[inline\]
BUG: KASAN: slab-use-after-free in skb\_queue\_purge\_reason+0x99/0x360 net/core/skbuff.c:3937
Read of size 8 at addr ffff88807cb8d858 by task syz.1.219/6718

CPU: 1 UID: 0 PID: 6718 Comm: syz.1.219 Not tainted 6.16.0-rc1-syzkaller-00196-g08207f42d3ff \#0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x189/0x250 lib/dump\_stack.c:120
 print\_address\_description mm/kasan/report.c:408 \[inline\]
 print\_report+0xd2/0x2b0 mm/kasan/report.c:521
 kasan\_report+0x118/0x150 mm/kasan/report.c:634
 skb\_queue\_empty\_lockless include/linux/skbuff.h:1891 \[inline\]
 skb\_queue\_purge\_reason+0x99/0x360 net/core/skbuff.c:3937
 skb\_queue\_purge include/linux/skbuff.h:3368 \[inline\]
 vhci\_flush+0x44/0x50 drivers/bluetooth/hci\_vhci.c:69
 hci\_dev\_do\_reset net/bluetooth/hci\_core.c:552 \[inline\]
 hci\_dev\_reset+0x420/0x5c0 net/bluetooth/hci\_core.c:592
 sock\_do\_ioctl+0xd9/0x300 net/socket.c:1190
 sock\_ioctl+0x576/0x790 net/socket.c:1311
 vfs\_ioctl fs/ioctl.c:51 \[inline\]
 \_\_do\_sys\_ioctl fs/ioctl.c:907 \[inline\]
 \_\_se\_sys\_ioctl+0xf9/0x170 fs/ioctl.c:893
 do\_syscall\_x64 arch/x86/entry/syscall\_64.c:63 \[inline\]
 do\_syscall\_64+0xfa/0x3b0 arch/x86/entry/syscall\_64.c:94
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
RIP: 0033:0x7fcf5b98e929
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:00007fcf5c7b9038 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcf5bbb6160 RCX: 00007fcf5b98e929
RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000009
RBP: 00007fcf5ba10b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fcf5bbb6160 R15: 00007ffd6353d528
 \</TASK\>

Allocated by task 6535:
 kasan\_save\_stack mm/kasan/common.c:47 \[inline\]
 kasan\_save\_track+0x3e/0x80 mm/kasan/common.c:68
 poison\_kmalloc\_redzone mm/kasan/common.c:377 \[inline\]
 \_\_kasan\_kmalloc+0x93/0xb0 mm/kasan/common.c:394
 kasan\_kmalloc include/linux/kasan.h:260 \[inline\]
 \_\_kmalloc\_cache\_noprof+0x230/0x3d0 mm/slub.c:4359
 kmalloc\_noprof include/linux/slab.h:905 \[inline\]
 kzalloc\_noprof include/linux/slab.h:1039 \[inline\]
 vhci\_open+0x57/0x360 drivers/bluetooth/hci\_vhci.c:635
 misc\_open+0x2bc/0x330 drivers/char/misc.c:161
 chrdev\_open+0x4c9/0x5e0 fs/char\_dev.c:414
 do\_dentry\_open+0xdf0/0x1970 fs/open.c:964
 vfs\_open+0x3b/0x340 fs/open.c:1094
 do\_open fs/namei.c:3887 \[inline\]
 path\_openat+0x2ee5/0x3830 fs/name
---truncated---

## Affected and fixed versions

- Linux: \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< dd4becd3fd4102696e1c15e6d260a1712a2d8685; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 90dee0a0ff84fac8accd5be98412b3819f667149; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< c56b177efce8b62798e4d96bdb9867106cb7c4a0; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< bc0819a25e04cd68ef3568cfa51b63118fea39a7; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< ce23b73f0f27e2dbeb81734a79db710f05aa33c6; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 0e5c144c557df910ab64d9c25d06399a9a735e65; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 1d6123102e9fbedc8d25bf4731da6d513173e49e (cvelist)
- Linux: 3.4 (cvelist)

## Mitigation

- Upgrade Linux to 1d6123102e9fbedc8d25bf4731da6d513173e49e or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38250.md
Affected: Linux >= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, < dd4becd3fd4102696e1c15e6d260a1712a2d8685; >= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, < 90dee0a0ff84fac8accd5be98412b3819f667149; >= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, < c56b177efce8b62798e4d96bdb9867106cb7c4a0; >= bf18c7118cf83ad4b9aa476…
Fixed in: Linux 90dee0a0ff84fac8accd5be98412b3819f667149, Linux 0e5c144c557df910ab64d9c25d06399a9a735e65, Linux 1d6123102e9fbedc8d25bf4731da6d513173e49e

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-38250 being exploited?

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

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

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

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

Linux \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< dd4becd3fd4102696e1c15e6d260a1712a2d8685; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 90dee0a0ff84fac8accd5be98412b3819f667149; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< c56b177efce8b62798e4d96bdb9867106cb7c4a0; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< bc0819a25e04cd68ef3568cfa51b63118fea39a7; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< ce23b73f0f27e2dbeb81734a79db710f05aa33c6; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 0e5c144c557df910ab64d9c25d06399a9a735e65; \>= bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f, \< 1d6123102e9fbedc8d25bf4731da6d513173e49e; Linux 3.4.

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

Yes. Fixed in Linux 90dee0a0ff84fac8accd5be98412b3819f667149, Linux 0e5c144c557df910ab64d9c25d06399a9a735e65, Linux 1d6123102e9fbedc8d25bf4731da6d513173e49e. Upgrade Linux to 1d6123102e9fbedc8d25bf4731da6d513173e49e or later.

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

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/bc0819a25e04cd68ef3568cfa51b63118fea39a7>
- patch: <https://git.kernel.org/stable/c/ce23b73f0f27e2dbeb81734a79db710f05aa33c6>
- patch: <https://git.kernel.org/stable/c/0e5c144c557df910ab64d9c25d06399a9a735e65>
- patch: <https://git.kernel.org/stable/c/1d6123102e9fbedc8d25bf4731da6d513173e49e>
- other: <https://git.kernel.org/stable/c/dd4becd3fd4102696e1c15e6d260a1712a2d8685>
- other: <https://git.kernel.org/stable/c/90dee0a0ff84fac8accd5be98412b3819f667149>
- other: <https://git.kernel.org/stable/c/c56b177efce8b62798e4d96bdb9867106cb7c4a0>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.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-38250>

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