Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_recv_frame
From: Hillf Danton
Date: Sun Sep 01 2024 - 07:16:38 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
@@ -6826,6 +6826,7 @@ static void l2cap_recv_frame(struct l2ca
break;
case L2CAP_CID_CONN_LESS:
+ *((__le16 *) skb->data) = 0;
psm = get_unaligned((__le16 *) skb->data);
skb_pull(skb, L2CAP_PSMLEN_SIZE);
l2cap_conless_channel(conn, psm, skb);
--