bisecting fixing commit since c63ee2939dc1c6eee6c544af1b4ab441490bfe6e building syzkaller on 598ca6c8b8766304c3b2865e38f5f301c39bd299 testing commit c63ee2939dc1c6eee6c544af1b4ab441490bfe6e with gcc (GCC) 8.1.0 kernel signature: 55eee3c07daaed33ed61213d006a855d2a6c19e4eb82fe486aed681e06b2bdf9 all runs: crashed: WARNING: refcount bug in sock_wfree testing current HEAD 4fccc2503536a564a4ba31a1d50439854201659f testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.1.0 kernel signature: 7c0caded846166628fce5997e86310a19c053ee01509789975f26665285963e1 all runs: crashed: WARNING: refcount bug in sock_wfree revisions tested: 2, total time: 24m51.773612557s (build: 17m24.239292177s, test: 6m23.045989511s) the crash still happens on HEAD commit msg: Linux 4.19.105 crash: WARNING: refcount bug in sock_wfree ------------[ cut here ]------------ IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready refcount_t: underflow; use-after-free. IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready WARNING: CPU: 1 PID: 7207 at lib/refcount.c:187 refcount_sub_and_test_checked+0x15a/0x180 lib/refcount.c:187 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 7207 Comm: syz-executor.4 Not tainted 4.19.105-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 panic+0x1cd/0x375 kernel/panic.c:186 __warn.cold.8+0x1b/0x3e kernel/panic.c:541 report_bug+0x1a4/0x200 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] do_error_trap+0x200/0x350 arch/x86/kernel/traps.c:296 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1037 RIP: 0010:refcount_sub_and_test_checked+0x15a/0x180 lib/refcount.c:187 Code: c1 44 29 e0 85 c9 89 c3 74 88 80 3d bc d0 bd 05 00 74 04 31 c0 eb a9 48 c7 c7 00 fd fe 86 c6 05 a8 d0 bd 05 01 e8 19 3b 49 fe <0f> 0b 31 c0 eb 90 4c 89 ff e8 58 11 a1 fe e9 2b ff ff ff e8 de 34 RSP: 0018:ffff888093bcf6d0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 00000000ffffff01 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffffff86ff18a0 RDI: ffffffff89a7f6e0 RBP: ffff888093bcf760 R08: ffffed1015d65079 R09: ffffed1015d65078 R10: ffffed1015d65078 R11: ffff8880aeb283c7 R12: 0000000000008100 R13: ffff888093bcf738 R14: 1ffff11012779edb R15: ffff88808615927c sock_wfree+0x9b/0x130 net/core/sock.c:1819 sctp_wfree+0x345/0x910 net/sctp/socket.c:8451 skb_release_head_state+0xfc/0x200 net/core/skbuff.c:616 skb_release_all+0xd/0x50 net/core/skbuff.c:629 __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0x91/0x270 net/core/skbuff.c:705 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1467 [inline] sctp_chunk_put+0x150/0x230 net/sctp/sm_make_chunk.c:1494 sctp_chunk_free+0x3f/0x50 net/sctp/sm_make_chunk.c:1481 __sctp_outq_teardown+0x1a2/0xc30 net/sctp/outqueue.c:234 sctp_outq_free+0x9/0x10 net/sctp/outqueue.c:291 sctp_association_free+0x1d5/0x711 net/sctp/associola.c:361 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1332 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x1605/0x5020 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ABORT+0x7c/0xc0 net/sctp/primitive.c:119 sctp_close+0x227/0x750 net/sctp/socket.c:1543 inet_release+0xb4/0x1b0 net/ipv4/af_inet.c:427 __sock_release+0xc2/0x290 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x1a9/0x200 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4141d1 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffd2bb3fad0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00000000004141d1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 0000000000000001 R08: ffffffffffffffff R09: ffffffffffffffff R10: 00007ffd2bb3fbb0 R11: 0000000000000293 R12: 000000000075bf20 R13: 000000000000ce9b R14: 0000000000761400 R15: 000000000075bf2c Kernel Offset: disabled Rebooting in 86400 seconds..