Skip to content
Heist/ feed
High

Bluetooth: hci_core: Fix use-after-free in vhci_flush()

Type: advisorySource: Official CVE List1 source record

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

Announced Group revision 1
Original source ↗

CVE-2025-38250

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-38250

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "dd4becd3fd4102696e1c15e6d260a1712a2d8685",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "90dee0a0ff84fac8accd5be98412b3819f667149",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "c56b177efce8b62798e4d96bdb9867106cb7c4a0",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "bc0819a25e04cd68ef3568cfa51b63118fea39a7",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "ce23b73f0f27e2dbeb81734a79db710f05aa33c6",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "0e5c144c557df910ab64d9c25d06399a9a735e65",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "bf18c7118cf83ad4b9aa476354b4a06bcb9d0c4f",
        "lessThan": "1d6123102e9fbedc8d25bf4731da6d513173e49e",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "include/net/bluetooth/hci_core.h",
      "net/bluetooth/hci_core.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "3.4"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "3.4",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.10.259",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.209",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.167",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.97",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.36",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.15.5",
        "versionType": "semver",
        "lessThanOrEqual": "6.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.16",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "include/net/bluetooth/hci_core.h",
      "net/bluetooth/hci_core.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-38250

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#30549 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement