bisecting fixing commit since 961f830af0658ef5ef8a7708786d634a6115f16b building syzkaller on ff51e5229e0ee846d2fd687cb0dbca13de758c66 testing commit 961f830af0658ef5ef8a7708786d634a6115f16b compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 478f5e01f089ee5c81893512d88d86eba3d00fd6eea3eaf3ccc51aeb979047fd run #0: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #1: crashed: KASAN: use-after-free Read in lock_sock_nested run #2: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #3: crashed: KASAN: use-after-free Read in lock_sock_nested run #4: crashed: KASAN: use-after-free Read in lock_sock_nested run #5: crashed: KASAN: use-after-free Read in lock_sock_nested run #6: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #7: crashed: KASAN: use-after-free Read in lock_sock_nested run #8: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #9: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #10: crashed: KASAN: use-after-free Read in lock_sock_nested run #11: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #12: crashed: KASAN: use-after-free Read in lock_sock_nested run #13: crashed: KASAN: use-after-free Read in lock_sock_nested run #14: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #15: crashed: KASAN: use-after-free Read in lock_sock_nested run #16: crashed: KASAN: use-after-free Read in lock_sock_nested run #17: crashed: KASAN: use-after-free Read in lock_sock_nested run #18: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #19: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put testing current HEAD 4938296e03bd227e5020d63d418956fe52baf97c testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 4e79609a7dfbc3b4518d722cedb1be57b42942e36bdb5ca3081f06ce4866289a run #0: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #1: crashed: KASAN: use-after-free Read in lock_sock_nested run #2: crashed: KASAN: use-after-free Read in lock_sock_nested run #3: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #4: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #5: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #6: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put run #7: crashed: KASAN: use-after-free Read in lock_sock_nested run #8: crashed: KASAN: use-after-free Read in lock_sock_nested run #9: crashed: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put revisions tested: 2, total time: 32m32.559995545s (build: 19m30.261589643s, test: 12m31.030795395s) the crash still happens on HEAD commit msg: Linux 4.19.198 crash: BUG: unable to handle kernel NULL pointer dereference in l2cap_chan_put BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 1 PID: 5600 Comm: kworker/1:3 Not tainted 4.19.198-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout RIP: 0010:refcount_dec_and_test arch/x86/include/asm/refcount.h:76 [inline] RIP: 0010:kref_put include/linux/kref.h:69 [inline] RIP: 0010:l2cap_chan_put+0xd/0x1a0 net/bluetooth/l2cap_core.c:498 Code: 8b 45 d0 e9 ef fe ff ff 48 89 df e8 9d 4b 7a fb e9 9d fe ff ff 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 ff 4f 18 0f 88 e9 1c c5 00 74 0b 5b 41 5c 41 5d 41 5e 41 5f 5d RSP: 0018:ffff8881d8cdfcd0 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff8881c553b280 RCX: 1ffff1103b348924 RDX: 1ffff11038aa76e0 RSI: ffff8881d9a44900 RDI: 0000000000000000 RBP: ffff8881d8cdfcf8 R08: ffff8881d9a44920 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881dc0c6140 R13: ffff8881d18e98b8 R14: ffff8881dc0c65a8 R15: ffff8881dc0c6250 FS: 0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000000846d001 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: l2cap_sock_kill.part.2+0x32/0x60 net/bluetooth/l2cap_sock.c:1061 l2cap_sock_kill net/bluetooth/l2cap_sock.c:1332 [inline] l2cap_sock_close_cb+0x84/0xa0 net/bluetooth/l2cap_sock.c:1331 l2cap_chan_timeout+0x163/0x1c0 net/bluetooth/l2cap_core.c:432 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: CR2: 0000000000000018 ---[ end trace 75cbcc98a3110800 ]--- RIP: 0010:refcount_dec_and_test arch/x86/include/asm/refcount.h:76 [inline] RIP: 0010:kref_put include/linux/kref.h:69 [inline] RIP: 0010:l2cap_chan_put+0xd/0x1a0 net/bluetooth/l2cap_core.c:498 Code: 8b 45 d0 e9 ef fe ff ff 48 89 df e8 9d 4b 7a fb e9 9d fe ff ff 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 ff 4f 18 0f 88 e9 1c c5 00 74 0b 5b 41 5c 41 5d 41 5e 41 5f 5d RSP: 0018:ffff8881d8cdfcd0 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff8881c553b280 RCX: 1ffff1103b348924 RDX: 1ffff11038aa76e0 RSI: ffff8881d9a44900 RDI: 0000000000000000 RBP: ffff8881d8cdfcf8 R08: ffff8881d9a44920 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881dc0c6140 R13: ffff8881d18e98b8 R14: ffff8881dc0c65a8 R15: ffff8881dc0c6250 FS: 0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000000846d001 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400