executing program executing program executing program executing program syzkaller login: [ 18.824499] refcount_t: underflow; use-after-free. [ 18.825098] ------------[ cut here ]------------ [ 18.825494] WARNING: CPU: 1 PID: 3041 at lib/refcount.c:186 refcount_sub_and_test+0x167/0x1b0 [ 18.826284] Kernel panic - not syncing: panic_on_warn set ... [ 18.826284] [ 18.826936] CPU: 1 PID: 3041 Comm: syzkaller608241 Not tainted 4.14.0-rc5-next-20171018+ #8 [ 18.827684] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 18.828392] Call Trace: [ 18.828617] dump_stack+0x194/0x257 [ 18.828952] ? arch_local_irq_restore+0x53/0x53 [ 18.829619] ? vsnprintf+0x1ed/0x1900 [ 18.829969] panic+0x1e4/0x41c [ 18.830258] ? refcount_error_report+0x214/0x214 [ 18.830676] ? show_regs_print_info+0x65/0x65 [ 18.831077] ? retint_kernel+0x10/0x10 [ 18.831435] ? __warn+0x1a9/0x1e0 [ 18.831755] ? refcount_sub_and_test+0x167/0x1b0 [ 18.832173] __warn+0x1c4/0x1e0 [ 18.832468] ? refcount_sub_and_test+0x169/0x1b0 [ 18.832898] ? refcount_sub_and_test+0x167/0x1b0 [ 18.833452] report_bug+0x211/0x2d0 [ 18.833799] fixup_bug+0x40/0x90 [ 18.834112] do_trap+0x260/0x390 [ 18.834434] do_error_trap+0x120/0x390 [ 18.834796] ? do_trap+0x390/0x390 [ 18.835125] ? refcount_sub_and_test+0x167/0x1b0 [ 18.835556] ? vprintk_emit+0x3ea/0x590 [ 18.835930] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 18.836378] do_invalid_op+0x1b/0x20 [ 18.836716] invalid_op+0x18/0x20 [ 18.837158] RIP: 0010:refcount_sub_and_test+0x167/0x1b0 [ 18.837630] RSP: 0018:ffff88003c616500 EFLAGS: 00010282 [ 18.838183] RAX: 0000000000000026 RBX: 0000000000000001 RCX: 0000000000000000 [ 18.838824] RDX: 0000000000000026 RSI: 1ffff100078c2c60 RDI: ffffed00078c2c94 [ 18.839795] RBP: ffff88003c616590 R08: 0000000000000001 R09: 0000000000000000 [ 18.840314] R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff100078c2ca1 [ 18.840897] R13: 00000000ffffff01 R14: 0000000000000100 R15: ffff88006cde69bc [ 18.841597] ? refcount_inc+0x50/0x50 [ 18.841897] ? sctp_outq_free+0x15/0x20 [ 18.842203] ? sctp_do_sm+0x271b/0x6a30 [ 18.842491] ? sctp_primitive_SHUTDOWN+0xa0/0xd0 [ 18.842828] ? sctp_close+0x3c6/0x980 [ 18.843103] ? inet_release+0xed/0x1c0 [ 18.843427] ? sock_release+0x8d/0x1e0 [ 18.843723] sctp_wfree+0x183/0x620 [ 18.844085] ? __sctp_write_space+0x910/0x910 [ 18.844410] skb_release_head_state+0x124/0x200 [ 18.844744] skb_release_all+0x15/0x60 [ 18.845034] consume_skb+0x153/0x490 [ 18.845503] ? sctp_chunk_put+0x99/0x420 [ 18.845795] ? alloc_skb_with_frags+0x750/0x750 [ 18.846134] ? sctp_chunk_hold+0x20/0x20 [ 18.846503] ? refcount_sub_and_test+0x115/0x1b0 [ 18.846844] ? refcount_inc+0x50/0x50 [ 18.847120] ? mark_held_locks+0xaf/0x100 [ 18.847421] ? sctp_datamsg_put+0x456/0x560 [ 18.847736] sctp_chunk_put+0x29c/0x420 [ 18.848027] ? sctp_chunk_hold+0x20/0x20 [ 18.848326] ? sctp_transport_dst_confirm+0x50/0x50 [ 18.848779] ? sctp_sched_fcfs_dequeue+0x198/0x290 [ 18.849231] ? sctp_sched_dequeue_common+0x5d0/0x5d0 [ 18.849701] sctp_chunk_free+0x53/0x60 [ 18.850057] __sctp_outq_teardown+0xa5b/0x1230 [ 18.850439] ? check_noncircular+0x20/0x20 [ 18.850826] ? sctp_inq_set_th_handler+0x1b0/0x1b0 [ 18.851270] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.851740] ? is_bpf_text_address+0xa4/0x120 [ 18.852163] ? __kernel_text_address+0xd/0x40 [ 18.852563] ? unwind_get_return_address+0x61/0xa0 [ 18.852962] ? __save_stack_trace+0x7e/0xd0 [ 18.853523] ? check_noncircular+0x20/0x20 [ 18.853833] ? print_irqtrace_events+0x270/0x270 [ 18.854193] ? print_irqtrace_events+0x270/0x270 [ 18.854541] ? save_stack+0xa3/0xd0 [ 18.854816] ? lock_acquire+0x1d5/0x580 [ 18.855115] ? lock_acquire+0x1d5/0x580 [ 18.855419] ? lock_timer_base+0x1a3/0x2b0 [ 18.855932] ? find_held_lock+0x35/0x1d0 [ 18.856271] ? sock_def_wakeup+0x1f9/0x350 [ 18.856652] ? lock_downgrade+0x990/0x990 [ 18.856961] ? lock_release+0xa40/0xa40 [ 18.857306] sctp_outq_free+0x15/0x20 [ 18.857594] sctp_association_free+0x2d0/0x930 [ 18.857936] ? sctp_asconf_queue_teardown+0x700/0x700 [ 18.858316] ? sock_def_wakeup+0x222/0x350 [ 18.858631] ? sk_dst_check+0x560/0x560 [ 18.858928] ? sctp_association_put+0x74/0x2f0 [ 18.859445] ? sctp_association_hold+0x20/0x20 [ 18.859841] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.860214] sctp_do_sm+0x271b/0x6a30 [ 18.861265] ? lock_downgrade+0x990/0x990 [ 18.861700] ? sctp_do_8_2_transport_strike.isra.16+0x8a0/0x8a0 [ 18.862271] ? print_irqtrace_events+0x270/0x270 [ 18.862744] ? print_irqtrace_events+0x270/0x270 [ 18.863168] ? is_bpf_text_address+0xa4/0x120 [ 18.863560] ? kernel_text_address+0x102/0x140 [ 18.863962] ? __kernel_text_address+0xd/0x40 [ 18.864353] ? unwind_get_return_address+0x61/0xa0 [ 18.864783] ? __save_stack_trace+0x7e/0xd0 [ 18.865731] ? find_held_lock+0x35/0x1d0 [ 18.866100] ? skb_dequeue+0x12a/0x180 [ 18.866440] ? lock_downgrade+0x990/0x990 [ 18.866805] ? do_raw_spin_trylock+0x190/0x190 [ 18.867208] ? mark_held_locks+0xaf/0x100 [ 18.867579] ? trace_hardirqs_on+0xd/0x10 [ 18.867949] sctp_primitive_SHUTDOWN+0xa0/0xd0 [ 18.868353] sctp_close+0x3c6/0x980 [ 18.868682] ? sctp_apply_peer_addr_params+0xf30/0xf30 [ 18.869312] ? dentry_free+0xcd/0x130 [ 18.869742] ? rcu_read_lock_sched_held+0x108/0x120 [ 18.870181] ? kmem_cache_free+0x249/0x280 [ 18.870553] ? dentry_free+0xd2/0x130 [ 18.870890] ? locks_remove_file+0x3fa/0x5a0 [ 18.871276] ? fcntl_setlk+0x10c0/0x10c0 [ 18.871634] ? __fsnotify_parent+0xb4/0x3a0 [ 18.872013] ? ip_mc_drop_socket+0x1ce/0x230 [ 18.872408] inet_release+0xed/0x1c0 [ 18.872741] sock_release+0x8d/0x1e0 [ 18.873464] ? sock_release+0x1e0/0x1e0 [ 18.873819] sock_close+0x16/0x20 [ 18.874125] __fput+0x327/0x7e0 [ 18.874421] ? fput+0x140/0x140 [ 18.874713] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 18.875221] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.875620] ____fput+0x15/0x20 [ 18.875909] task_work_run+0x199/0x270 [ 18.876253] ? task_work_cancel+0x210/0x210 [ 18.876630] ? _raw_spin_unlock+0x22/0x30 [ 18.876993] ? switch_task_namespaces+0x87/0xc0 [ 18.877739] do_exit+0x9b5/0x1ad0 [ 18.878053] ? mm_update_next_owner+0x930/0x930 [ 18.878464] ? check_noncircular+0x20/0x20 [ 18.878834] ? check_noncircular+0x20/0x20 [ 18.879201] ? lock_downgrade+0x990/0x990 [ 18.879567] ? do_raw_spin_trylock+0x190/0x190 [ 18.879963] ? mark_held_locks+0xaf/0x100 [ 18.880332] ? reacquire_held_locks+0x1fd/0x3d0 [ 18.880741] ? reacquire_held_locks+0x1fd/0x3d0 [ 18.881193] ? find_held_lock+0x35/0x1d0 [ 18.881551] ? release_sock+0x1d4/0x2a0 [ 18.881902] ? lock_downgrade+0x990/0x990 [ 18.882268] ? check_noncircular+0x20/0x20 [ 18.882640] ? do_raw_spin_trylock+0x190/0x190 [ 18.883041] ? trace_hardirqs_on+0xd/0x10 [ 18.883406] ? __local_bh_enable_ip+0x9d/0x160 [ 18.883809] ? __local_bh_enable_ip+0x9d/0x160 [ 18.884214] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.884652] ? release_sock+0x1d4/0x2a0 [ 18.885302] ? trace_hardirqs_on+0xd/0x10 [ 18.885748] ? __local_bh_enable_ip+0x9d/0x160 [ 18.886159] ? find_held_lock+0x35/0x1d0 [ 18.886524] ? get_signal+0x7ae/0x16d0 [ 18.886860] ? lock_downgrade+0x990/0x990 [ 18.887232] do_group_exit+0x149/0x400 [ 18.887573] ? __lock_is_held+0xb6/0x140 [ 18.887929] ? SyS_exit+0x30/0x30 [ 18.888233] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.888626] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.889336] get_signal+0x73f/0x16d0 [ 18.889674] ? ptrace_notify+0x130/0x130 [ 18.890027] ? __pmd_alloc+0x4e0/0x4e0 [ 18.890374] ? find_held_lock+0x35/0x1d0 [ 18.890739] ? __might_fault+0x110/0x1d0 [ 18.891101] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 18.891574] do_signal+0x94/0x1ee0 [ 18.891893] ? inet_sendmsg+0x126/0x5e0 [ 18.892239] ? __might_sleep+0x95/0x190 [ 18.892591] ? setup_sigcontext+0x7d0/0x7d0 [ 18.892968] ? selinux_socket_sendmsg+0x36/0x40 [ 18.893422] ? security_socket_sendmsg+0x89/0xb0 [ 18.893838] ? inet_recvmsg+0x5f0/0x5f0 [ 18.894188] ? sock_sendmsg+0x4f/0x110 [ 18.894529] ? fput+0xd2/0x140 [ 18.894811] ? SYSC_sendto+0x40d/0x5a0 [ 18.895155] ? SYSC_connect+0x470/0x470 [ 18.895511] ? mm_fault_error+0x2c0/0x2c0 [ 18.895872] ? exit_to_usermode_loop+0x8c/0x310 [ 18.896286] exit_to_usermode_loop+0x214/0x310 [ 18.896686] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 18.897221] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.897666] syscall_return_slowpath+0x42f/0x510 [ 18.898080] ? finish_task_switch+0x1f6/0x740 [ 18.898474] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 18.898911] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 18.899341] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.899777] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.900198] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 18.900609] RIP: 0033:0x43c7a9 [ 18.900885] RSP: 002b:00007f9862062db8 EFLAGS: 00000206 ORIG_RAX: 000000000000002c [ 18.901608] RAX: 000000000000001a RBX: 0000000000000000 RCX: 000000000043c7a9 [ 18.902234] RDX: 000000000000001a RSI: 0000000020001f98 RDI: 0000000000000003 [ 18.902951] RBP: 0000000000000000 R08: 0000000020944000 R09: 0000000000000010 [ 18.903575] R10: 0000000000000001 R11: 0000000000000206 R12: 0000000000000000 [ 18.904200] R13: 0000000000000000 R14: 00007f98620639c0 R15: 00007f9862063700 [ 18.905236] Dumping ftrace buffer: [ 18.905631] (ftrace buffer empty) [ 18.905954] Kernel Offset: disabled [ 18.906275] Rebooting in 86400 seconds..