Commit b08efff
committed
Merge: CVE-2024-49951: Bluetooth: MGMT: Fix possible crash on mgmt_index_removed
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5621
JIRA: https://issues.redhat.com/browse/RHEL-64476
CVE: CVE-2024-49951
Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5549
```
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>
(cherry picked from commit f53e1c9)
```
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
Signed-off-by: Bastien Nocera <bnocera@redhat.com>
---
<small>Created 2024-10-29 15:48 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small>
Approved-by: Bastien Nocera <bnocera@redhat.com>
Approved-by: Lenny Szubowicz <lszubowi@redhat.com>
Approved-by: David Marlin <dmarlin@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>1 file changed
+32
-18
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 | | |
| |||
1498 | 1503 | | |
1499 | 1504 | | |
1500 | 1505 | | |
1501 | | - | |
| 1506 | + | |
| 1507 | + | |
1502 | 1508 | | |
1503 | 1509 | | |
1504 | 1510 | | |
| |||
1672 | 1678 | | |
1673 | 1679 | | |
1674 | 1680 | | |
1675 | | - | |
| 1681 | + | |
| 1682 | + | |
1676 | 1683 | | |
1677 | 1684 | | |
1678 | 1685 | | |
| |||
1905 | 1912 | | |
1906 | 1913 | | |
1907 | 1914 | | |
1908 | | - | |
| 1915 | + | |
1909 | 1916 | | |
1910 | 1917 | | |
1911 | 1918 | | |
| |||
3751 | 3758 | | |
3752 | 3759 | | |
3753 | 3760 | | |
3754 | | - | |
| 3761 | + | |
| 3762 | + | |
3755 | 3763 | | |
3756 | 3764 | | |
3757 | 3765 | | |
| |||
3926 | 3934 | | |
3927 | 3935 | | |
3928 | 3936 | | |
3929 | | - | |
| 3937 | + | |
| 3938 | + | |
3930 | 3939 | | |
3931 | 3940 | | |
3932 | 3941 | | |
| |||
5817 | 5826 | | |
5818 | 5827 | | |
5819 | 5828 | | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
5820 | 5834 | | |
5821 | 5835 | | |
5822 | 5836 | | |
5823 | 5837 | | |
5824 | 5838 | | |
5825 | | - | |
5826 | | - | |
5827 | 5839 | | |
5828 | 5840 | | |
5829 | 5841 | | |
| |||
6056 | 6068 | | |
6057 | 6069 | | |
6058 | 6070 | | |
6059 | | - | |
| 6071 | + | |
| 6072 | + | |
6060 | 6073 | | |
6061 | 6074 | | |
6062 | 6075 | | |
| |||
8015 | 8028 | | |
8016 | 8029 | | |
8017 | 8030 | | |
8018 | | - | |
| 8031 | + | |
| 8032 | + | |
8019 | 8033 | | |
8020 | 8034 | | |
8021 | 8035 | | |
| |||
9337 | 9351 | | |
9338 | 9352 | | |
9339 | 9353 | | |
9340 | | - | |
| 9354 | + | |
9341 | 9355 | | |
9342 | 9356 | | |
9343 | 9357 | | |
9344 | 9358 | | |
9345 | | - | |
| 9359 | + | |
9346 | 9360 | | |
9347 | 9361 | | |
9348 | 9362 | | |
| |||
9393 | 9407 | | |
9394 | 9408 | | |
9395 | 9409 | | |
9396 | | - | |
| 9410 | + | |
9397 | 9411 | | |
9398 | 9412 | | |
9399 | 9413 | | |
| |||
9405 | 9419 | | |
9406 | 9420 | | |
9407 | 9421 | | |
9408 | | - | |
| 9422 | + | |
9409 | 9423 | | |
9410 | | - | |
| 9424 | + | |
9411 | 9425 | | |
9412 | | - | |
| 9426 | + | |
9413 | 9427 | | |
9414 | 9428 | | |
9415 | 9429 | | |
| |||
0 commit comments