bisecting fixing commit since f56f3d0e65adb447b8b583c8ed4fbbe544c9bfde building syzkaller on 598ca6c8b8766304c3b2865e38f5f301c39bd299 testing commit f56f3d0e65adb447b8b583c8ed4fbbe544c9bfde with gcc (GCC) 8.1.0 kernel signature: e926645ab199d0cf4b2c7e33859705cd8dc86b2c all runs: crashed: WARNING: refcount bug in sock_wfree testing current HEAD e1f7d50ae3a3ec342e87a9b1ce6787bfb8b3c08b testing commit e1f7d50ae3a3ec342e87a9b1ce6787bfb8b3c08b with gcc (GCC) 8.1.0 kernel signature: 5ccbf45e02d582c392d174df3df64bd8016e751f all runs: crashed: WARNING: refcount bug in sock_wfree revisions tested: 2, total time: 23m7.364668173s (build: 16m0.284732183s, test: 6m23.05471079s) the crash still happens on HEAD commit msg: Linux 4.14.160 crash: WARNING: refcount bug in sock_wfree IPv6: ADDRCONF(NETDEV_UP): veth1_to_hsr: link is not ready IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_hsr: link becomes ready refcount_t: underflow; use-after-free. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 6960 at lib/refcount.c:187 refcount_sub_and_test.cold.13+0x13/0x1c lib/refcount.c:187 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 6960 Comm: syz-executor.4 Not tainted 4.14.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 panic+0x1b0/0x358 kernel/panic.c:183 __warn.cold.8+0x25/0x2c kernel/panic.c:547 report_bug+0x1a4/0x1f3 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:177 [inline] do_error_trap+0x1bd/0x310 arch/x86/kernel/traps.c:295 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:963 RIP: 0010:refcount_sub_and_test.cold.13+0x13/0x1c lib/refcount.c:187 RSP: 0018:ffff88807a387730 EFLAGS: 00010286 RAX: 0000000000000026 RBX: 0000000000008100 RCX: 0000000000000000 RDX: 0000000000000026 RSI: ffffffff86bcd8e0 RDI: ffffed100f470edd RBP: ffff88807a387740 R08: ffff8880a5304ac8 R09: 0000000000000000 R10: 0000000000000000 R11: dffffc0000000000 R12: 0000000000008100 R13: ffff8880a82032bc R14: ffffffff883524e0 R15: 0000000000000000 sock_wfree+0x9b/0x120 net/core/sock.c:1812 sctp_wfree+0x28b/0x5f0 net/sctp/socket.c:7829 skb_release_head_state+0xfc/0x1f0 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+0x84/0x2a0 net/core/skbuff.c:705 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1442 [inline] sctp_chunk_put+0x150/0x230 net/sctp/sm_make_chunk.c:1469 sctp_chunk_free+0x3f/0x50 net/sctp/sm_make_chunk.c:1456 __sctp_outq_teardown+0x1a2/0xe10 net/sctp/outqueue.c:228 sctp_outq_free+0x9/0x10 net/sctp/outqueue.c:284 sctp_association_free+0x1d5/0x711 net/sctp/associola.c:358 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:924 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1312 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1179 [inline] sctp_do_sm+0x2141/0x4910 net/sctp/sm_sideeffect.c:1150 sctp_primitive_ABORT+0x7c/0xc0 net/sctp/primitive.c:119 sctp_close+0x23e/0x710 net/sctp/socket.c:1560 inet_release+0xd9/0x1c0 net/ipv4/af_inet.c:425 __sock_release+0xc2/0x2a0 net/socket.c:602 sock_close+0x10/0x20 net/socket.c:1139 __fput+0x232/0x750 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x16a/0x1b0 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x416/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4141d1 RSP: 002b:00007ffeba090d50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00000000004141d1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 0000000000000001 R08: ffffffffffffffff R09: ffffffffffffffff R10: 00007ffeba090e30 R11: 0000000000000293 R12: 000000000075bf20 R13: 000000000000ce07 R14: 0000000000761400 R15: 000000000075bf2c Kernel Offset: disabled Rebooting in 86400 seconds..