Re: [syzbot] [bluetooth?] KASAN: invalid-free in hci_req_sync_complete
From: Hillf Danton
Date: Mon Jun 24 2024 - 06:40:37 EST
On Wed, 19 Jun 2024 04:23:24 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 2ccbdf43d5e7 Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=125874ea980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ccbdf43d5e7
--- x/net/bluetooth/hci_request.c
+++ h/net/bluetooth/hci_request.c
@@ -160,6 +160,8 @@ int __hci_req_sync(struct hci_dev *hdev,
if (err == -ERESTARTSYS)
return -EINTR;
+ if (!err)
+ return -ETIMEDOUT;
switch (hdev->req_status) {
case HCI_REQ_DONE:
--