Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_recv_frame
From: Hillf Danton
Date: Sun Sep 01 2024 - 05:05:12 EST
On Sun, 01 Sep 2024 00:39:27 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: e8784b0aef62 Merge tag 'usb-6.11-rc6' of git://git.kernel...
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10dfdadb980000
#syz test upstream e8784b0aef62
--- i/net/bluetooth/l2cap_core.c
+++ l/net/bluetooth/l2cap_core.c
@@ -1797,6 +1797,7 @@ static void l2cap_conn_del(struct hci_co
if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
cancel_delayed_work_sync(&conn->info_timer);
+ cancel_work_sync(&hcon->hdev->rx_work);
hcon->l2cap_data = NULL;
conn->hchan = NULL;
l2cap_conn_put(conn);
--