Bug 2300438 (CVE-2024-41063)

Summary: CVE-2024-41063 kernel: Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.19.319, kernel 5.4.281, kernel 5.10.223, kernel 5.15.164, kernel 6.1.101, kernel 6.6.42, kernel 6.9.11, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2301603    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-29 15:43:25 UTC
In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: hci_core: cancel all works upon hci_unregister_dev()

syzbot is reporting that calling hci_release_dev() from hci_error_reset()
due to hci_dev_put() from hci_error_reset() can cause deadlock at
destroy_workqueue(), for hci_error_reset() is called from
hdev->req_workqueue which destroy_workqueue() needs to flush.

We need to make sure that hdev->{rx_work,cmd_work,tx_work} which are
queued into hdev->workqueue and hdev->{power_on,error_reset} which are
queued into hdev->req_workqueue are no longer running by the moment

       destroy_workqueue(hdev->workqueue);
       destroy_workqueue(hdev->req_workqueue);

are called from hci_release_dev().

Call cancel_work_sync() on these work items from hci_unregister_dev()
as soon as hdev->list is removed from hci_dev_list.

Comment 1 Mauro Matteo Cascella 2024-07-30 12:04:48 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072906-CVE-2024-41063-b9bd@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-30 12:05:09 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301603]

Comment 10 errata-xmlrpc 2024-11-12 09:37:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:9315 https://access.redhat.com/errata/RHSA-2024:9315