{
  "id": "CVE-2025-38593",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38593",
  "published_at": "2025-08-19T17:03:18.96Z",
  "title": "Bluetooth: hci_sync: fix double free in 'hci_discovery_filter_clear()'",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: hci_sync: fix double free in 'hci_discovery_filter_clear()'\n\nFunction 'hci_discovery_filter_clear()' frees 'uuids' array and then\nsets it to NULL. There is a tiny chance of the following race:\n\n'hci_cmd_sync_work()'\n\n 'update_passive_scan_sync()'\n\n   'hci_update_passive_scan_sync()'\n\n     'hci_discovery_filter_clear()'\n       kfree(uuids);\n\n       \u003c-------------------------preempted--------------------------------\u003e\n                                           'start_service_discovery()'\n\n                                             'hci_discovery_filter_clear()'\n                                               kfree(uuids); // DOUBLE FREE\n\n       \u003c-------------------------preempted--------------------------------\u003e\n\n      uuids = NULL;\n\nTo fix it let's add locking around 'kfree()' call and NULL pointer\nassignment. Otherwise the following backtrace fires:\n\n[ ] ------------[ cut here ]------------\n[ ] kernel BUG at mm/slub.c:547!\n[ ] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP\n[ ] CPU: 3 UID: 0 PID: 246 Comm: bluetoothd Tainted: G O 6.12.19-kernel #1\n[ ] Tainted: [O]=OOT_MODULE\n[ ] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n[ ] pc : __slab_free+0xf8/0x348\n[ ] lr : __slab_free+0x48/0x348\n...\n[ ] Call trace:\n[ ]  __slab_free+0xf8/0x348\n[ ]  kfree+0x164/0x27c\n[ ]  start_service_discovery+0x1d0/0x2c0\n[ ]  hci_sock_sendmsg+0x518/0x924\n[ ]  __sock_sendmsg+0x54/0x60\n[ ]  sock_write_iter+0x98/0xf8\n[ ]  do_iter_readv_writev+0xe4/0x1c8\n[ ]  vfs_writev+0x128/0x2b0\n[ ]  do_writev+0xfc/0x118\n[ ]  __arm64_sys_writev+0x20/0x2c\n[ ]  invoke_syscall+0x68/0xf0\n[ ]  el0_svc_common.constprop.0+0x40/0xe0\n[ ]  do_el0_svc+0x1c/0x28\n[ ]  el0_svc+0x30/0xd0\n[ ]  el0t_64_sync_handler+0x100/0x12c\n[ ]  el0t_64_sync+0x194/0x198\n[ ] Code: 8b0002e6 eb17031f 54fffbe1 d503201f (d4210000)\n[ ] ---[ end trace 0000000000000000 ]---",
  "cwe": "CWE-415",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c 86f3dcd1f331cfd4fd7ec88906955134ec51afbe",
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c 7ce9bb0b95fc280e9212b8922590c492ca1d9c39",
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c 16852eccbdfaf41a666705e3f8be55cf2864c5ca",
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c a351ff6b8ecca4229afaa0d98042bead8de64799",
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c f8069f34c4c976786ded97498012225af87435d7",
          "\u003e= ad383c2c65a5baf16e334cd40a013cc302176891, \u003c 2935e556850e9c94d7a00adf14d3cd7fe406ac03"
        ],
        "fixed_in": [
          "86f3dcd1f331cfd4fd7ec88906955134ec51afbe",
          "7ce9bb0b95fc280e9212b8922590c492ca1d9c39",
          "16852eccbdfaf41a666705e3f8be55cf2864c5ca",
          "a351ff6b8ecca4229afaa0d98042bead8de64799",
          "f8069f34c4c976786ded97498012225af87435d7",
          "2935e556850e9c94d7a00adf14d3cd7fe406ac03"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.17"
        ],
        "fixed_in": [
          "0",
          "6.1.159",
          "6.6.117",
          "6.12.42",
          "6.15.10",
          "6.16.1",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 86f3dcd1f331cfd4fd7ec88906955134ec51afbe or 7ce9bb0b95fc280e9212b8922590c492ca1d9c39 or 16852eccbdfaf41a666705e3f8be55cf2864c5ca or a351ff6b8ecca4229afaa0d98042bead8de64799 or f8069f34c4c976786ded97498012225af87435d7 or 2935e556850e9c94d7a00adf14d3cd7fe406ac03 or later.",
      "Upgrade Linux to 0 or 6.1.159 or 6.6.117 or 6.12.42 or 6.15.10 or 6.16.1 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
