Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Write in __hci_acl_create_connection_sync
From: Hillf Danton
Date: Fri Feb 09 2024 - 02:40:12 EST
On Thu, 08 Feb 2024 01:27:31 -0800
> HEAD commit: b1d3a0e70c38 Add linux-next specific files for 20240208
> git tree: linux-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=107c2d8fe80000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
--- x/net/bluetooth/hci_sync.c
+++ y/net/bluetooth/hci_sync.c
@@ -6553,12 +6553,14 @@ static int __hci_acl_create_connection_s
if (err == -ETIMEDOUT)
hci_abort_conn_sync(hdev, conn, HCI_ERROR_LOCAL_HOST_TERM);
+ hci_conn_put(conn);
return err;
}
int hci_acl_create_connection_sync(struct hci_dev *hdev,
struct hci_conn *conn)
{
+ hci_conn_get(conn);
return hci_cmd_sync_queue(hdev, __hci_acl_create_connection_sync,
conn, NULL);
}
--