Bluetooth: hci_sync: don't drain cmd_sync backlog on unregister
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.113, 6.18.56, 7.2.10
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_sync: don't drain cmd_sync backlog on unregister hci_unregister_dev() disables cmd_work and cmd_timer, then calls hci_cmd_sync_clear(), whose cancel_work_sync() waits for hci_cmd_sync_work() to return. That worker dequeues and runs every entry on cmd_sync_work_list. With cmd_work disabled nothing reaches the controller, so each queued HCI command waits the full HCI_CMD_TIMEOUT (2s). The backlog has no bound. Userspace can keep queuing MGMT commands such as MGMT_OP_GET_CLOCK_INFO against a controller that doesn't answer. Closing /dev/vhci then blocks in vhci_release() for backlog * 2s: INFO: task syz-executor:5749 blocked for more than 143 seconds. cancel_work_sync hci_cmd_sync_clear hci_unregister_dev vhci_release In a local reproduction the backlog held more than 5000 entries, which comes to hours of hang. Stop the worker from taking new entries once HCI_UNREGISTER is set, and wake any request still waiting with -ENODEV before cancelling the work. The entries left over are destroyed with -ECANCELED by the existing sweep in hci_cmd_sync_clear(). They stay on the list until the work has stopped, so hci_cmd_sync_dequeue() and friends still see them. A callback already running may still issue another command, which delays unregister by at most one timeout per remaining command, not by the whole backlog.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 008ee9eb8a11bcabf12c91771dd4f470b082bd44 · fixed in b11acfcb5925ed27fae692b27931a1ac732677fb; From 008ee9eb8a11bcabf12c91771dd4f470b082bd44 · fixed in 143bde97c4101ae68eb656c87e620c45b07a3090; From 008ee9eb8a11bcabf12c91771dd4f470b082bd44 · fixed in 7f16443a30f4e86d84ae4faf057d333b41ddb757; From 008ee9eb8a11bcabf12c91771dd4f470b082bd44 · fixed in e8ba8c9c74d1035042cdf6cb5adf8f59b9b1271c; From 008ee9eb8a11bcabf12c91771dd4f470b082bd44 · fixed in b1f24c1ab52345e810c42a1a81286cb5a7c92252
- Linux Linux
5.17
- KernelLinux
From 5.17.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.113; From 6.13.0 · fixed in 6.18.56; From 6.19.0 · fixed in 7.2.10