Commit 8d9f696
Bluetooth: MGMT: Fix possible crash on mgmt_index_removed
JIRA: https://issues.redhat.com/browse/RHEL-64476
CVE: CVE-2024-49951
commit f53e1c9
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Thu Sep 12 12:34:42 2024 -0400
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.
Fixes: 7cf5c29 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Reported-by: jiaymao <quic_jiaymao@quicinc.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>1 parent cd58e17 commit 8d9f696
1 file changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
1449 | | - | |
1450 | | - | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1451 | 1455 | | |
1452 | | - | |
| 1456 | + | |
| 1457 | + | |
1453 | 1458 | | |
1454 | 1459 | | |
1455 | 1460 | | |
| |||
9337 | 9342 | | |
9338 | 9343 | | |
9339 | 9344 | | |
9340 | | - | |
| 9345 | + | |
9341 | 9346 | | |
9342 | 9347 | | |
9343 | 9348 | | |
9344 | 9349 | | |
9345 | | - | |
| 9350 | + | |
9346 | 9351 | | |
9347 | 9352 | | |
9348 | 9353 | | |
| |||
9393 | 9398 | | |
9394 | 9399 | | |
9395 | 9400 | | |
9396 | | - | |
| 9401 | + | |
9397 | 9402 | | |
9398 | 9403 | | |
9399 | 9404 | | |
| |||
9405 | 9410 | | |
9406 | 9411 | | |
9407 | 9412 | | |
9408 | | - | |
| 9413 | + | |
9409 | 9414 | | |
9410 | | - | |
| 9415 | + | |
9411 | 9416 | | |
9412 | | - | |
| 9417 | + | |
9413 | 9418 | | |
9414 | 9419 | | |
9415 | 9420 | | |
| |||
0 commit comments