{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53046",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-53046"
  ],
  "published": "2025-05-02T15:56:53Z",
  "summary": "Bluetooth: Fix race condition in hci_cmd_sync_clear",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: Fix race condition in hci_cmd_sync_clear\n\nThere is a potential race condition in hci_cmd_sync_work and\nhci_cmd_sync_clear, and could lead to use-after-free. For instance,\nhci_cmd_sync_work is added to the 'req_workqueue' after cancel_work_sync\nThe entry of 'cmd_sync_work_list' may be freed in hci_cmd_sync_clear, and\ncausing kernel panic when it is used in 'hci_cmd_sync_work'.\n\nHere's the call trace:\n\ndump_stack_lvl+0x49/0x63\nprint_report.cold+0x5e/0x5d3\n? hci_cmd_sync_work+0x282/0x320\nkasan_report+0xaa/0x120\n? hci_cmd_sync_work+0x282/0x320\n__asan_report_load8_noabort+0x14/0x20\nhci_cmd_sync_work+0x282/0x320\nprocess_one_work+0x77b/0x11c0\n? _raw_spin_lock_irq+0x8e/0xf0\nworker_thread+0x544/0x1180\n? poll_idle+0x1e0/0x1e0\nkthread+0x285/0x320\n? process_one_work+0x11c0/0x11c0\n? kthread_complete_and_exit+0x30/0x30\nret_from_fork+0x22/0x30\n</TASK>\n\nAllocated by task 266:\nkasan_save_stack+0x26/0x50\n__kasan_kmalloc+0xae/0xe0\nkmem_cache_alloc_trace+0x191/0x350\nhci_cmd_sync_queue+0x97/0x2b0\nhci_update_passive_scan+0x176/0x1d0\nle_conn_complete_evt+0x1b5/0x1a00\nhci_le_conn_complete_evt+0x234/0x340\nhci_le_meta_evt+0x231/0x4e0\nhci_event_packet+0x4c5/0xf00\nhci_rx_work+0x37d/0x880\nprocess_one_work+0x77b/0x11c0\nworker_thread+0x544/0x1180\nkthread+0x285/0x320\nret_from_fork+0x22/0x30\n\nFreed by task 269:\nkasan_save_stack+0x26/0x50\nkasan_set_track+0x25/0x40\nkasan_set_free_info+0x24/0x40\n____kasan_slab_free+0x176/0x1c0\n__kasan_slab_free+0x12/0x20\nslab_free_freelist_hook+0x95/0x1a0\nkfree+0xba/0x2f0\nhci_cmd_sync_clear+0x14c/0x210\nhci_unregister_dev+0xff/0x440\nvhci_release+0x7b/0xf0\n__fput+0x1f3/0x970\n____fput+0xe/0x20\ntask_work_run+0xd4/0x160\ndo_exit+0x8b0/0x22a0\ndo_group_exit+0xba/0x2a0\nget_signal+0x1e4a/0x25b0\narch_do_signal_or_restart+0x93/0x1f80\nexit_to_user_mode_prepare+0xf5/0x1a0\nsyscall_exit_to_user_mode+0x26/0x50\nret_from_fork+0x15/0x30",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.22"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53046"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/608901a77c945ac15dea23f6098c9882ef19d9f0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/be586211a3ab40a4f4ca60450e0d31606afc55ec"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1c66bee492a5fe00ae3fe890bb693bfc99f994c6"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The free side requires hci_unregister_dev() (e.g. closing /dev/vhci or driver teardown); an adjacent Bluetooth peer can feed LE events into the allocate path but cannot itself unregister the HCI device, so exploitation is staged via local open/write/close of the transport.\nAC:L - The attacker controls both sides of the race\u2014injecting HCI events (e.g. LE Connection Complete via vhci) that queue cmd_sync work through the HCI_UNREGISTER TOCTOU in hci_cmd_sync_queue, then closing the fd to run hci_cmd_sync_clear\u2014and can retry the open/inject/close cycle until the unprotected list free races with hci_cmd_sync_work.\nPR:L - vhci_open() has no capable() check, so any principal granted /dev/vhci (Android bluetooth uid, containers, permissive udev) can create/destroy virtual controllers and inject frames; this matches prior hci_unregister_dev teardown UAF scores (e.g. CVE-2025-38250, CVE-2024-58241).\nUI:N - The attacker performs device creation, HCI event injection, and teardown from its own processes; no separate victim action is required.\nS:U - The UAF corrupts kernel slab within the host kernel's security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - Use-after-free of the kmalloc'd hci_cmd_sync_work_entry (containing func/data/destroy) allows reclaim/spray of the freed object and arbitrary kernel memory disclosure when hci_cmd_sync_work reads the stale entry.\nI:H - The same UAF exposes sprayable function pointers (entry->func/destroy) invoked from hci_cmd_sync_work, enabling arbitrary write and control-flow hijack after heap grooming.\nA:H - The demonstrated KASAN slab-use-after-free in hci_cmd_sync_work causes kernel oops/panic, and the attacker can repeat the race to deny service."
    }
  }
}
