bisecting fixing commit since c63ee2939dc1c6eee6c544af1b4ab441490bfe6e building syzkaller on 598ca6c8b8766304c3b2865e38f5f301c39bd299 testing commit c63ee2939dc1c6eee6c544af1b4ab441490bfe6e with gcc (GCC) 8.1.0 kernel signature: 6a561d0bfbc05a0124c427f964533d3544cb5b05950d223ccec5cb8db158fb66 all runs: crashed: WARNING: refcount bug in sock_wfree testing current HEAD 14cfdbd39e316efd91ae6e403ef8211f0b022603 testing commit 14cfdbd39e316efd91ae6e403ef8211f0b022603 with gcc (GCC) 8.1.0 kernel signature: 72787208d65172172997b046dbcd51f94923b87670d89821ce3c7f906a30e320 all runs: crashed: WARNING: refcount bug in sock_wfree revisions tested: 2, total time: 25m11.605434371s (build: 17m38.454899827s, test: 6m13.155883897s) the crash still happens on HEAD commit msg: Linux 4.19.112 crash: WARNING: refcount bug in sock_wfree IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_hsr: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_0: link becomes ready ------------[ cut here ]------------ IPv6: ADDRCONF(NETDEV_UP): veth1_to_team: link is not ready refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 7140 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: 0 PID: 7140 Comm: syz-executor.2 Not tainted 4.19.112-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 43 b8 bd 05 00 74 04 31 c0 eb a9 48 c7 c7 80 02 ff 86 c6 05 2f b8 bd 05 01 e8 19 18 49 fe <0f> 0b 31 c0 eb 90 4c 89 ff e8 08 fa a0 fe e9 2b ff ff ff e8 de 11 RSP: 0018:ffff8880a82376d0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 00000000ffffff01 RCX: 0000000000000000 RDX: 0000000000000004 RSI: 0000000000000008 RDI: ffffffff89a816e0 RBP: ffff8880a8237760 R08: ffffed1015d43ee3 R09: ffffed1015d43ee2 R10: ffffed1015d43ee2 R11: ffff8880aea1f717 R12: 0000000000008100 R13: ffff8880a8237738 R14: 1ffff11015046edb R15: ffff8880a879b27c sock_wfree+0x9b/0x130 net/core/sock.c:1822 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:00007ffdd9d6e2d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00000000004141d1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 0000000000000001 R08: ffffffffffffffff R09: ffffffffffffffff R10: 00007ffdd9d6e3b0 R11: 0000000000000293 R12: 000000000075bf20 R13: 000000000000cd22 R14: 0000000000761400 R15: 000000000075bf2c Kernel Offset: disabled Rebooting in 86400 seconds..