In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hcicore: cancel all works upon hciunregister_dev()
syzbot is reporting that calling hcireleasedev() from hcierrorreset() due to hcidevput() from hcierrorreset() can cause deadlock at destroyworkqueue(), for hcierrorreset() is called from hdev->reqworkqueue which destroy_workqueue() needs to flush.
We need to make sure that hdev->{rxwork,cmdwork,txwork} which are queued into hdev->workqueue and hdev->{poweron,errorreset} which are queued into hdev->reqworkqueue are no longer running by the moment
destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);
are called from hcireleasedev().
Call cancelworksync() on these work items from hciunregisterdev() as soon as hdev->list is removed from hcidevlist.
[
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"279112632579539801589563226104362534670",
"198531660147855454828635344161465988420",
"263185622732079218286135188198040830494"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d151a103775dd9645c78c97f77d6e2a5298d913",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-0eaa8bac"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 726.0,
"function_hash": "10204685698143673445380232451376156648"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48542881997e17b49dc16b93fe910e0cfcf7a9f9",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-25736d9c"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 726.0,
"function_hash": "10204685698143673445380232451376156648"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cfc84b1d464cc024286f42a090718f9067b80ed",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-2a0df243"
},
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"279112632579539801589563226104362534670",
"198531660147855454828635344161465988420",
"263185622732079218286135188198040830494"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96600c2e5ee8213dbab5df1617293d8e847bb4fa",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-3a3d0334"
},
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"279112632579539801589563226104362534670",
"198531660147855454828635344161465988420",
"263185622732079218286135188198040830494"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d6cbce18370641a21dd889e8613d8153df15eb39",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-40271774"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 852.0,
"function_hash": "43766215563809299214982666568461815624"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d6cbce18370641a21dd889e8613d8153df15eb39",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-7b05e9d4"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 852.0,
"function_hash": "43766215563809299214982666568461815624"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f939bd73fed12dddc2a32a76116c19ca47c7678",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-982b5747"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 852.0,
"function_hash": "43766215563809299214982666568461815624"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d151a103775dd9645c78c97f77d6e2a5298d913",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-a1c2d274"
},
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"279112632579539801589563226104362534670",
"198531660147855454828635344161465988420",
"263185622732079218286135188198040830494"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f939bd73fed12dddc2a32a76116c19ca47c7678",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-bdc69c90"
},
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"148306640267180838938374981631676529995",
"271874425979479050282505188582480783388",
"233234204695581103855346691816768871201"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48542881997e17b49dc16b93fe910e0cfcf7a9f9",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-c85dd513"
},
{
"target": {
"function": "hci_unregister_dev",
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"length": 852.0,
"function_hash": "43766215563809299214982666568461815624"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96600c2e5ee8213dbab5df1617293d8e847bb4fa",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-41063-d5fd992d"
},
{
"target": {
"file": "net/bluetooth/hci_core.c"
},
"signature_version": "v1",
"digest": {
"line_hashes": [
"257634099522219392747092949991854201091",
"148306640267180838938374981631676529995",
"271874425979479050282505188582480783388",
"233234204695581103855346691816768871201"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cfc84b1d464cc024286f42a090718f9067b80ed",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-41063-f75002a7"
}
]