[....] Starting enhanced syslogd: rsyslogd[ 13.401911] audit: type=1400 audit(1538829594.509:4): avc: denied { syslog } for pid=1922 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.10.21' (ECDSA) to the list of known hosts. net.ipv6.conf.syz_tun.accept_dad = 0 net.ipv6.conf.syz_tun.router_solicitations = 0 executing program syzkaller login: [ 35.090062] [ 35.091709] ====================================================== [ 35.098000] [ INFO: possible circular locking dependency detected ] [ 35.104382] 4.4.159+ #108 Not tainted [ 35.108182] ------------------------------------------------------- [ 35.114560] syz-executor861/2081 is trying to acquire lock: [ 35.120242] (&(&q->lock)->rlock){+.-...}, at: [] ip_defrag+0x31b/0x40c0 [ 35.129103] [ 35.129103] but task is already holding lock: [ 35.135045] (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 35.143837] [ 35.143837] which lock already depends on the new lock. [ 35.143837] [ 35.152157] [ 35.152157] the existing dependency chain (in reverse order) is: [ 35.159752] -> #1 (_xmit_NETROM){+.-...}: [ 35.164534] [] lock_acquire+0x15e/0x450 [ 35.170778] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 35.177726] [] depot_save_stack+0x20b/0x5eb [ 35.184321] [] kasan_kmalloc.part.1+0xc9/0xf0 [ 35.191094] [] kasan_kmalloc+0xaf/0xc0 [ 35.197266] [] kasan_slab_alloc+0x12/0x20 [ 35.203680] [] kmem_cache_alloc+0xdc/0x2c0 [ 35.210212] [] inet_getpeer+0x159d/0x1d70 [ 35.216645] [] icmp6_send+0x17b7/0x1b70 [ 35.223509] [] icmpv6_param_prob+0x29/0x40 [ 35.230025] [] ipv6_frag_rcv+0x3de6/0x4f80 [ 35.236529] [] ip6_input_finish+0x57d/0x1510 [ 35.243201] [] ip6_input+0xf6/0x200 [ 35.249105] [] ip6_rcv_finish+0x14e/0x670 [ 35.255522] [] ipv6_rcv+0x10b2/0x1d10 [ 35.261606] [] __netif_receive_skb_core+0x12c8/0x2820 [ 35.269064] [] __netif_receive_skb+0x5b/0x1c0 [ 35.275826] [] process_backlog+0x20a/0x670 [ 35.282331] [] net_rx_action+0x367/0xd50 [ 35.288662] [] __do_softirq+0x22c/0xa1a [ 35.294906] [] do_softirq_own_stack+0x1c/0x30 [ 35.301664] [] do_softirq.part.2+0x54/0x60 [ 35.308165] [] do_softirq+0x19/0x20 [ 35.314055] [] netif_rx_ni+0xec/0x3a0 [ 35.320122] [] tun_get_user+0xf3a/0x2690 [ 35.326448] [] tun_chr_write_iter+0xd5/0x190 [ 35.333127] [] do_iter_readv_writev+0x133/0x1d0 [ 35.340062] [] do_readv_writev+0x335/0x6f0 [ 35.346579] [] vfs_writev+0x7b/0xb0 [ 35.352471] [] SyS_writev+0xd9/0x250 [ 35.358450] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 35.365646] -> #0 (&(&q->lock)->rlock){+.-...}: [ 35.370959] [] __lock_acquire+0x3e6c/0x5f10 [ 35.377560] [] lock_acquire+0x15e/0x450 [ 35.383825] [] _raw_spin_lock+0x36/0x50 [ 35.390071] [] ip_defrag+0x31b/0x40c0 [ 35.396159] [] ip_check_defrag+0x3a7/0x710 [ 35.402665] [] packet_rcv_fanout+0x52a/0x5e0 [ 35.409341] [] dev_hard_start_xmit+0x650/0x11c0 [ 35.416285] [] sch_direct_xmit+0x2b8/0x6c0 [ 35.422992] [] __dev_queue_xmit+0xf95/0x1c30 [ 35.431419] [] dev_queue_xmit+0x17/0x20 [ 35.437663] [] neigh_resolve_output+0x600/0x780 [ 35.444609] [] ip_finish_output2+0x8f0/0x1100 [ 35.451381] [] ip_do_fragment+0x1870/0x1f60 [ 35.458581] [] ip_fragment.constprop.5+0x145/0x200 [ 35.465778] [] ip_finish_output+0x396/0xc00 [ 35.472369] [] ip_mc_output+0x237/0x980 [ 35.478628] [] ip_local_out+0x9b/0x180 [ 35.484781] [] ip_send_skb+0x3c/0xc0 [ 35.490763] [] udp_send_skb+0x503/0xc70 [ 35.497007] [] udp_sendmsg+0x16c9/0x1c70 [ 35.503535] [] inet_sendmsg+0x203/0x4d0 [ 35.509964] [] sock_sendmsg+0xbb/0x110 [ 35.516130] [] SyS_sendto+0x220/0x370 [ 35.522200] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 35.529397] [ 35.529397] other info that might help us debug this: [ 35.529397] [ 35.537546] Possible unsafe locking scenario: [ 35.537546] [ 35.543578] CPU0 CPU1 [ 35.548218] ---- ---- [ 35.552860] lock(_xmit_NETROM); [ 35.556537] lock(&(&q->lock)->rlock); [ 35.563244] lock(_xmit_NETROM); [ 35.569429] lock(&(&q->lock)->rlock); [ 35.573606] [ 35.573606] *** DEADLOCK *** [ 35.573606] [ 35.579644] 4 locks held by syz-executor861/2081: [ 35.584459] #0: (rcu_read_lock_bh){......}, at: [] ip_finish_output2+0x20b/0x1100 [ 35.594428] #1: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x1d7/0x1c30 [ 35.604623] #2: (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 35.614004] #3: (rcu_read_lock){......}, at: [] dev_hard_start_xmit+0xa8/0x11c0 [ 35.624986] [ 35.624986] stack backtrace: [ 35.629477] CPU: 1 PID: 2081 Comm: syz-executor861 Not tainted 4.4.159+ #108 [ 35.636683] 0000000000000000 8daffd7cabc4c567 ffff8801d3e86d88 ffffffff81a994bd [ 35.644686] ffffffff83acd180 ffffffff83acd840 ffffffff83acd180 ffff8800b837e838 [ 35.652725] ffff8800b837df00 ffff8801d3e86dd0 ffffffff813a84ea 0000000000000003 [ 35.660711] Call Trace: [ 35.663274] [] dump_stack+0xc1/0x124 [ 35.668615] [] print_circular_bug.cold.34+0x2f7/0x432 [ 35.675430] [] __lock_acquire+0x3e6c/0x5f10 [ 35.681730] [] ? trace_hardirqs_on+0x10/0x10 [ 35.687786] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 35.694692] [] ? trace_hardirqs_on_caller+0x266/0x590 [ 35.701771] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 35.708943] [] ? mod_timer+0x433/0x8f0 [ 35.714459] [] lock_acquire+0x15e/0x450 [ 35.720078] [] ? ip_defrag+0x31b/0x40c0 [ 35.725681] [] ? inet_frag_find+0x27a/0x9a0 [ 35.731632] [] _raw_spin_lock+0x36/0x50 [ 35.737232] [] ? ip_defrag+0x31b/0x40c0 [ 35.742842] [] ip_defrag+0x31b/0x40c0 [ 35.748271] [] ? trace_hardirqs_on+0x10/0x10 [ 35.754309] [] ? ipv4_frags_init_net+0x3a0/0x3a0 [ 35.760700] [] ip_check_defrag+0x3a7/0x710 [ 35.766560] [] ? ip_defrag+0x40c0/0x40c0 [ 35.772253] [] packet_rcv_fanout+0x52a/0x5e0 [ 35.778306] [] ? fanout_demux_rollover+0x4e0/0x4e0 [ 35.784867] [] dev_hard_start_xmit+0x650/0x11c0 [ 35.791164] [] ? dev_hard_start_xmit+0xa8/0x11c0 [ 35.797546] [] sch_direct_xmit+0x2b8/0x6c0 [ 35.803580] [] ? dev_deactivate_queue.constprop.6+0x160/0x160 [ 35.811092] [] __dev_queue_xmit+0xf95/0x1c30 [ 35.817130] [] ? __dev_queue_xmit+0x1d7/0x1c30 [ 35.823340] [] ? trace_hardirqs_on+0x10/0x10 [ 35.829375] [] ? netdev_pick_tx+0x2c0/0x2c0 [ 35.835349] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 35.842082] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 35.848815] [] ? memcpy+0x45/0x50 [ 35.853897] [] dev_queue_xmit+0x17/0x20 [ 35.860236] [] neigh_resolve_output+0x600/0x780 [ 35.866621] [] ? ip_finish_output2+0x8f0/0x1100 [ 35.872915] [] ip_finish_output2+0x8f0/0x1100 [ 35.879052] [] ? ip_finish_output2+0x20b/0x1100 [ 35.885350] [] ? nf_ct_deliver_cached_events+0x335/0x560 [ 35.892428] [] ? nf_ct_deliver_cached_events+0x83/0x560 [ 35.899599] [] ? nf_conntrack_seqadj_fini+0x20/0x20 [ 35.906617] [] ? ip_send_check+0xb0/0xb0 [ 35.912329] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 35.919064] [] ip_do_fragment+0x1870/0x1f60 [ 35.925022] [] ? ip_send_check+0xb0/0xb0 [ 35.930717] [] ip_fragment.constprop.5+0x145/0x200 [ 35.937282] [] ip_finish_output+0x396/0xc00 [ 35.943234] [] ip_mc_output+0x237/0x980 [ 35.948854] [] ? ip_queue_xmit+0x1a80/0x1a80 [ 35.954906] [] ? ip_make_skb+0x116/0x210 [ 35.961639] [] ? ip_fragment.constprop.5+0x200/0x200 [ 35.968812] [] ? ip_flush_pending_frames+0x30/0x30 [ 35.975715] [] ip_local_out+0x9b/0x180 [ 35.982358] [] ip_send_skb+0x3c/0xc0 [ 35.987966] [] udp_send_skb+0x503/0xc70 [ 35.993611] [] udp_sendmsg+0x16c9/0x1c70 [ 35.999300] [] ? ip_reply_glue_bits+0xc0/0xc0 [ 36.005422] [] ? udp_lib_unhash+0x630/0x630 [ 36.011370] [] ? trace_hardirqs_on+0x10/0x10 [ 36.017407] [] ? sock_has_perm+0x1c1/0x3f0 [ 36.023266] [] ? sock_has_perm+0x2a1/0x3f0 [ 36.029127] [] ? sock_has_perm+0x9f/0x3f0 [ 36.034902] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 36.041631] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 36.048360] [] ? check_preemption_disabled+0x3b/0x170 [ 36.055176] [] ? inet_sendmsg+0x143/0x4d0 [ 36.060964] [] inet_sendmsg+0x203/0x4d0 [ 36.066569] [] ? inet_sendmsg+0x73/0x4d0 [ 36.072253] [] ? inet_recvmsg+0x4c0/0x4c0 [ 36.078041] [] sock_sendmsg+0xbb/0x110 [ 36.083572] [] SyS_sendto+0x220/0x370 [ 36.089877] [] ? SyS_getpeername+0x2d0/0x2d0 [ 36.097311] [] ? _raw_spin_unlock+0x2c/0x50 [ 36.103868] [] ? handle_mm_fault+0x49a/0x2f30 [ 36.109995] [] ? inet_dgram_connect+0x11e/0x200 [ 36.116298] [] ? retint_user+0x18/0x3c [ 36.121821] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 36.128652] [] ? trace_hardirqs_on_thunk+0x17/0x19 [ 36.135207] [] entry_SYSCALL_64_fastpath+0x1e/0x9a