Debian GNU/Linux 7 syzkaller ttyS0 executing program syzkaller login: [ 47.804527] refcount_t: underflow; use-after-free. [ 47.804988] ------------[ cut here ]------------ [ 47.805365] WARNING: CPU: 2 PID: 3014 at lib/refcount.c:186 refcount_sub_and_test+0x167/0x1b0 [ 47.806053] Kernel panic - not syncing: panic_on_warn set ... [ 47.806053] [ 47.806617] CPU: 2 PID: 3014 Comm: syzkaller704351 Not tainted 4.13.0-next-20170905+ #15 [ 47.807217] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 47.807912] Call Trace: [ 47.808135] dump_stack+0x194/0x257 [ 47.808395] ? arch_local_irq_restore+0x53/0x53 [ 47.808770] panic+0x1e4/0x417 [ 47.808998] ? __warn+0x1d9/0x1d9 [ 47.809315] ? show_regs_print_info+0x65/0x65 [ 47.809739] ? refcount_sub_and_test+0x167/0x1b0 [ 47.810173] __warn+0x1c4/0x1d9 [ 47.810477] ? refcount_sub_and_test+0x167/0x1b0 [ 47.810916] report_bug+0x211/0x2d0 [ 47.811254] fixup_bug+0x40/0x90 [ 47.811567] do_trap+0x260/0x390 [ 47.811908] do_error_trap+0x120/0x390 [ 47.812267] ? do_trap+0x390/0x390 [ 47.812595] ? refcount_sub_and_test+0x167/0x1b0 [ 47.813053] ? vprintk_emit+0x3ea/0x590 [ 47.813427] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.813872] do_invalid_op+0x1b/0x20 [ 47.814217] invalid_op+0x18/0x20 [ 47.814537] RIP: 0010:refcount_sub_and_test+0x167/0x1b0 [ 47.815025] RSP: 0018:ffff88003a906300 EFLAGS: 00010282 [ 47.815517] RAX: 0000000000000026 RBX: 0000000000000001 RCX: 0000000000000000 [ 47.816177] RDX: 0000000000000026 RSI: 1ffff10007520c20 RDI: ffffed0007520c54 [ 47.816683] RBP: ffff88003a906390 R08: ffff88003a9059f0 R09: 0000000000000000 [ 47.817186] R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff10007520c61 [ 47.817690] R13: 00000000ffffff01 R14: 0000000000000100 R15: ffff88003b7f1324 [ 47.818207] ? refcount_inc+0x50/0x50 [ 47.818478] ? __sctp_outq_teardown+0xc7d/0x15a0 [ 47.818810] ? sctp_association_free+0x2d0/0x930 [ 47.819145] ? sctp_do_sm+0x28e7/0x6dd0 [ 47.819423] ? sctp_primitive_SHUTDOWN+0xa0/0xd0 [ 47.819754] ? sctp_close+0x3c6/0x980 [ 47.820020] ? inet_release+0xed/0x1c0 [ 47.820296] sctp_wfree+0x183/0x620 [ 47.820554] ? __sctp_write_space+0x910/0x910 [ 47.820875] skb_release_head_state+0x124/0x200 [ 47.821232] skb_release_all+0x15/0x60 [ 47.821837] consume_skb+0x153/0x490 [ 47.822466] ? sctp_chunk_put+0x99/0x420 [ 47.822770] ? alloc_skb_with_frags+0x710/0x710 [ 47.823142] ? sctp_chunk_hold+0x20/0x20 [ 47.823445] ? refcount_sub_and_test+0x115/0x1b0 [ 47.823795] ? refcount_inc+0x50/0x50 [ 47.824077] ? mark_held_locks+0xb2/0x100 [ 47.824391] ? sctp_datamsg_put+0x456/0x560 [ 47.824803] sctp_chunk_put+0x29c/0x420 [ 47.825169] ? sctp_chunk_hold+0x20/0x20 [ 47.825544] ? sctp_transport_dst_confirm+0x50/0x50 [ 47.826013] sctp_chunk_free+0x53/0x60 [ 47.826371] __sctp_outq_teardown+0xc7d/0x15a0 [ 47.826789] ? inet6_release+0x50/0x70 [ 47.827151] ? sctp_inq_set_th_handler+0x1b0/0x1b0 [ 47.827600] ? unwind_next_frame.part.6+0x1ae/0xc70 [ 47.828059] ? unwind_next_frame.part.6+0x1ae/0xc70 [ 47.828513] ? unwind_dump+0x4c0/0x4c0 [ 47.828874] ? unwind_dump+0x4c0/0x4c0 [ 47.829231] ? copy_trace+0x1d0/0x1d0 [ 47.829584] ? check_noncircular+0x20/0x20 [ 47.829971] ? check_noncircular+0x20/0x20 [ 47.830267] ? unwind_get_return_address+0x61/0xa0 [ 47.830614] ? __save_stack_trace+0x61/0xd0 [ 47.831009] ? check_noncircular+0x20/0x20 [ 47.831399] ? print_usage_bug+0x480/0x480 [ 47.831790] ? find_held_lock+0x39/0x1d0 [ 47.832168] ? lock_downgrade+0x990/0x990 [ 47.832553] ? sk_dst_check+0x560/0x560 [ 47.832840] ? rcu_read_lock_sched_held+0x108/0x120 [ 47.833192] ? lock_release+0xd70/0xd70 [ 47.833475] sctp_outq_free+0x15/0x20 [ 47.833741] sctp_association_free+0x2d0/0x930 [ 47.834066] ? sctp_asconf_queue_teardown+0x700/0x700 [ 47.834430] ? sock_def_wakeup+0x222/0x350 [ 47.834728] ? sk_dst_check+0x560/0x560 [ 47.835008] ? sctp_association_put+0x74/0x2f0 [ 47.835326] ? sctp_association_hold+0x20/0x20 [ 47.835651] ? __unwind_start+0x169/0x330 [ 47.835943] ? sctp_sm_lookup_event+0x95/0x3c0 [ 47.836263] sctp_do_sm+0x28e7/0x6dd0 [ 47.836540] ? sctp_do_8_2_transport_strike.isra.16+0x8a0/0x8a0 [ 47.836969] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 47.837330] ? print_usage_bug+0x480/0x480 [ 47.837632] ? print_usage_bug+0x480/0x480 [ 47.837933] ? find_held_lock+0x39/0x1d0 [ 47.838237] ? lock_downgrade+0x990/0x990 [ 47.838545] ? skb_dequeue+0x22/0x180 [ 47.838817] ? do_raw_spin_trylock+0x190/0x190 [ 47.839136] ? mark_held_locks+0xb2/0x100 [ 47.839430] ? trace_hardirqs_on+0xd/0x10 [ 47.839725] sctp_primitive_SHUTDOWN+0xa0/0xd0 [ 47.840044] sctp_close+0x3c6/0x980 [ 47.840384] ? sctp_apply_peer_addr_params+0xf30/0xf30 [ 47.840782] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.841147] ? trace_hardirqs_on+0xd/0x10 [ 47.841480] ? rcu_eqs_enter_common.constprop.73+0x270/0x270 [ 47.841906] ? ipv6_sock_ac_close+0x2e8/0x3e0 [ 47.842240] ? ipv6_sock_mc_close+0x148/0x1a0 [ 47.842566] ? ipv6_sock_ac_drop+0x580/0x580 [ 47.842935] ? ip_mc_drop_socket+0x1ce/0x230 [ 47.843542] ? __fsnotify_parent+0xb4/0x3a0 [ 47.843865] inet_release+0xed/0x1c0 [ 47.844152] inet6_release+0x50/0x70 [ 47.844440] sock_release+0x8d/0x1e0 [ 47.844723] ? sock_release+0x1e0/0x1e0 [ 47.845012] sock_close+0x16/0x20 [ 47.845300] __fput+0x333/0x7f0 [ 47.845557] ? fput+0x140/0x140 [ 47.845801] ? check_same_owner+0x320/0x320 [ 47.846178] ____fput+0x15/0x20 [ 47.846441] task_work_run+0x199/0x270 [ 47.846730] ? task_work_cancel+0x210/0x210 [ 47.847044] ? free_nsproxy+0x185/0x1f0 [ 47.847334] ? switch_task_namespaces+0xa2/0xc0 [ 47.847674] do_exit+0xa52/0x1b40 [ 47.847930] ? print_usage_bug+0x480/0x480 [ 47.848251] ? mm_update_next_owner+0x930/0x930 [ 47.848595] ? find_held_lock+0x39/0x1d0 [ 47.848897] ? check_noncircular+0x20/0x20 [ 47.849266] ? check_noncircular+0x20/0x20 [ 47.849655] ? lock_downgrade+0x990/0x990 [ 47.850044] ? reacquire_held_locks+0x205/0x3d0 [ 47.850473] ? check_noncircular+0x20/0x20 [ 47.850864] ? find_held_lock+0x39/0x1d0 [ 47.851246] ? lock_downgrade+0x990/0x990 [ 47.851629] ? lock_downgrade+0x990/0x990 [ 47.852013] ? find_held_lock+0x39/0x1d0 [ 47.852392] ? lock_downgrade+0x990/0x990 [ 47.852779] ? recalc_sigpending_tsk+0x117/0x150 [ 47.853217] ? recalc_sigpending+0x103/0x160 [ 47.853649] ? recalc_sigpending_tsk+0x150/0x150 [ 47.854111] ? get_signal+0x397/0x17e0 [ 47.854531] do_group_exit+0x149/0x400 [ 47.854886] ? __lock_is_held+0xbc/0x140 [ 47.855260] ? SyS_exit+0x30/0x30 [ 47.855579] ? _raw_spin_unlock_irq+0x27/0x70 [ 47.856019] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.856519] get_signal+0x7e8/0x17e0 [ 47.856899] ? ptrace_notify+0x130/0x130 [ 47.857275] ? __local_bh_enable_ip+0x9d/0x160 [ 47.857698] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.858158] ? release_sock+0x1d4/0x2a0 [ 47.858524] ? trace_hardirqs_on+0xd/0x10 [ 47.858905] ? __local_bh_enable_ip+0x9d/0x160 [ 47.859351] ? _raw_spin_unlock_bh+0x30/0x40 [ 47.859735] ? release_sock+0x1d4/0x2a0 [ 47.860103] ? trace_hardirqs_on+0xd/0x10 [ 47.860399] do_signal+0x94/0x1ee0 [ 47.860653] ? inet_sendmsg+0x11f/0x5e0 [ 47.860931] ? inet_sendmsg+0x126/0x5e0 [ 47.861209] ? __might_sleep+0x95/0x190 [ 47.861491] ? setup_sigcontext+0x7d0/0x7d0 [ 47.861792] ? selinux_socket_sendmsg+0x36/0x40 [ 47.862118] ? security_socket_sendmsg+0x89/0xb0 [ 47.862450] ? inet_recvmsg+0x5f0/0x5f0 [ 47.862729] ? sock_sendmsg+0x4f/0x110 [ 47.863002] ? fput+0xd2/0x140 [ 47.863225] ? SYSC_sendto+0x413/0x5a0 [ 47.863532] ? SYSC_connect+0x480/0x480 [ 47.863820] ? exit_to_usermode_loop+0x98/0x300 [ 47.864162] exit_to_usermode_loop+0x224/0x300 [ 47.864764] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 47.865149] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.865557] syscall_return_slowpath+0x42f/0x500 [ 47.866016] ? finish_task_switch+0x1aa/0x740 [ 47.866429] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 47.866886] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 47.867339] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.867795] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 47.868233] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 47.868664] RIP: 0033:0x43b279 [ 47.868964] RSP: 002b:00007f3929fbfdb8 EFLAGS: 00000206 ORIG_RAX: 000000000000002c [ 47.869663] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 000000000043b279 [ 47.870188] RDX: 0000000000000001 RSI: 0000000020a75f25 RDI: 0000000000000003 [ 47.870693] RBP: 0000000000000000 R08: 00000000205e4fe4 R09: 000000000000001c [ 47.871222] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 [ 47.871725] R13: 0000000000000000 R14: 00007f3929fc09c0 R15: 00007f3929fc0700 [ 47.872412] Dumping ftrace buffer: [ 47.872746] (ftrace buffer empty) [ 47.873004] Kernel Offset: disabled [ 47.873311] Rebooting in 86400 seconds..