Skip to content

Commit d7a10f8

Browse files
committed
Merge: CVE-2024-57987: Bluetooth: btrtl: check for NULL in btrtl_setup_realtek()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6456 JIRA: https://issues.redhat.com/browse/RHEL-81268 CVE: CVE-2024-57987 ``` commit 3c15082 Author: Max Chou <max.chou@realtek.com> Date: Tue Dec 31 14:57:19 2024 +0800 Bluetooth: btrtl: check for NULL in btrtl_setup_realtek() If insert an USB dongle which chip is not maintained in ic_id_table, it will hit the NULL point accessed. Add a null point check to avoid the Kernel Oops. Fixes: b39910b ("Bluetooth: Populate hci_set_hw_info for Intel and Realtek") Reviewed-by: Alex Lu <alex_lu@realsil.com.cn> Signed-off-by: Max Chou <max.chou@realtek.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> --- <small>Created 2025-02-27 16:51 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: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 93b9d00 + 5a17406 commit d7a10f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/bluetooth/btrtl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,12 +1351,14 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
13511351

13521352
btrtl_set_quirks(hdev, btrtl_dev);
13531353

1354-
hci_set_hw_info(hdev,
1354+
if (btrtl_dev->ic_info) {
1355+
hci_set_hw_info(hdev,
13551356
"RTL lmp_subver=%u hci_rev=%u hci_ver=%u hci_bus=%u",
13561357
btrtl_dev->ic_info->lmp_subver,
13571358
btrtl_dev->ic_info->hci_rev,
13581359
btrtl_dev->ic_info->hci_ver,
13591360
btrtl_dev->ic_info->hci_bus);
1361+
}
13601362

13611363
btrtl_free(btrtl_dev);
13621364
return ret;

0 commit comments

Comments
 (0)