CVE-2024-49951: Bluetooth: MGMT: Fix possible crash on mgmt_index_removed

Description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: MGMT: Fix possible crash on mgmt_index_removed

If mgmt_index_removed is called while there are commands queued on
cmd_sync it could lead to crashes like the bellow trace:

0x0000053D: __list_del_entry_valid_or_report+0x98/0xdc
0x0000053D: mgmt_pending_remove+0x18/0x58 [bluetooth]
0x0000053E: mgmt_remove_adv_monitor_complete+0x80/0x108 [bluetooth]
0x0000053E: hci_cmd_sync_work+0xbc/0x164 [bluetooth]

So while handling mgmt_index_removed this attempts to dequeue
commands passed as user_data to cmd_sync.

Classification

CVE ID: CVE-2024-49951

Affected Products

Vendor: Linux

Product: Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 5.08% (scored less or equal to compared to others)

EPSS Date: 2025-02-04 (when was this score calculated)

References

https://git.kernel.org/stable/c/19b40ca62607cef78369549d1af091f2fd558931
https://git.kernel.org/stable/c/4883296505aa7e4863c6869b689afb6005633b23
https://git.kernel.org/stable/c/0cc47233af35fb5f10b5e6a027cb4ccd480caf9a
https://git.kernel.org/stable/c/8c3f7943a29145d8a2d8e24893762f7673323eae
https://git.kernel.org/stable/c/f53e1c9c726d83092167f2226f32bd3b73f26c21

Timeline