[....] Starting enhanced syslogd: rsyslogd[ 13.589766] audit: type=1400 audit(1538998758.774:4): avc: denied { syslog } for pid=1925 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.44' (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: [ 32.150754] [ 32.152491] ====================================================== [ 32.158870] [ INFO: possible circular locking dependency detected ] [ 32.165243] 4.4.159+ #44 Not tainted [ 32.168922] ------------------------------------------------------- [ 32.175384] syz-executor065/2079 is trying to acquire lock: [ 32.181148] (&(&q->lock)->rlock){+.-...}, at: [] ip_defrag+0x31b/0x40c0 [ 32.190002] [ 32.190002] but task is already holding lock: [ 32.195941] (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 32.204738] [ 32.204738] which lock already depends on the new lock. [ 32.204738] [ 32.213038] [ 32.213038] the existing dependency chain (in reverse order) is: [ 32.220625] -> #1 (_xmit_NETROM){+.-...}: [ 32.225436] [] lock_acquire+0x15e/0x450 [ 32.231688] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.238625] [] depot_save_stack+0x20b/0x5eb [ 32.245305] [] kasan_kmalloc.part.1+0xc9/0xf0 [ 32.252061] [] kasan_kmalloc+0xaf/0xc0 [ 32.258328] [] kasan_slab_alloc+0x12/0x20 [ 32.264731] [] kmem_cache_alloc+0xdc/0x2c0 [ 32.271228] [] inet_getpeer+0x159d/0x1d70 [ 32.277634] [] icmp6_send+0x17b7/0x1b70 [ 32.283867] [] icmpv6_param_prob+0x29/0x40 [ 32.290362] [] ipv6_frag_rcv+0x3de6/0x4f80 [ 32.296904] [] ip6_input_finish+0x57d/0x1510 [ 32.303573] [] ip6_input+0xf6/0x200 [ 32.309461] [] ip6_rcv_finish+0x14e/0x670 [ 32.315861] [] ipv6_rcv+0x10b2/0x1d10 [ 32.321919] [] __netif_receive_skb_core+0x12c8/0x2820 [ 32.329382] [] __netif_receive_skb+0x5b/0x1c0 [ 32.336140] [] process_backlog+0x20a/0x670 [ 32.342631] [] net_rx_action+0x367/0xd50 [ 32.348945] [] __do_softirq+0x22c/0xa1a [ 32.355257] [] do_softirq_own_stack+0x1c/0x30 [ 32.362021] [] do_softirq.part.2+0x54/0x60 [ 32.368514] [] do_softirq+0x19/0x20 [ 32.374413] [] netif_rx_ni+0xec/0x3a0 [ 32.380507] [] tun_get_user+0xf3a/0x2690 [ 32.386841] [] tun_chr_write_iter+0xd5/0x190 [ 32.393510] [] do_iter_readv_writev+0x133/0x1d0 [ 32.400460] [] compat_do_readv_writev+0x337/0x6f0 [ 32.407696] [] compat_writev+0xe1/0x150 [ 32.413931] [] compat_SyS_writev+0xd8/0x1c0 [ 32.420512] [] do_fast_syscall_32+0x31e/0xa80 [ 32.427358] [] sysenter_flags_fixed+0xd/0x1a [ 32.434028] -> #0 (&(&q->lock)->rlock){+.-...}: [ 32.439326] [] __lock_acquire+0x3e6c/0x5f10 [ 32.445974] [] lock_acquire+0x15e/0x450 [ 32.452228] [] _raw_spin_lock+0x36/0x50 [ 32.458456] [] ip_defrag+0x31b/0x40c0 [ 32.464511] [] ip_check_defrag+0x3a7/0x710 [ 32.471002] [] packet_rcv_fanout+0x52a/0x5e0 [ 32.477765] [] dev_hard_start_xmit+0x650/0x11c0 [ 32.484691] [] sch_direct_xmit+0x2b8/0x6c0 [ 32.491179] [] __dev_queue_xmit+0xf95/0x1c30 [ 32.497841] [] dev_queue_xmit+0x17/0x20 [ 32.504077] [] neigh_resolve_output+0x600/0x780 [ 32.510998] [] ip_finish_output2+0x8f0/0x1100 [ 32.517746] [] ip_do_fragment+0x1870/0x1f60 [ 32.524323] [] ip_fragment.constprop.5+0x145/0x200 [ 32.531732] [] ip_finish_output+0x396/0xc00 [ 32.538313] [] ip_mc_output+0x237/0x980 [ 32.544541] [] ip_local_out+0x9b/0x180 [ 32.550790] [] ip_send_skb+0x3c/0xc0 [ 32.556774] [] udp_send_skb+0x503/0xc70 [ 32.563001] [] udp_sendmsg+0x16c9/0x1c70 [ 32.569312] [] inet_sendmsg+0x203/0x4d0 [ 32.575541] [] sock_sendmsg+0xbb/0x110 [ 32.581706] [] SyS_sendto+0x220/0x370 [ 32.587761] [] do_fast_syscall_32+0x31e/0xa80 [ 32.594529] [] sysenter_flags_fixed+0xd/0x1a [ 32.601195] [ 32.601195] other info that might help us debug this: [ 32.601195] [ 32.609320] Possible unsafe locking scenario: [ 32.609320] [ 32.615345] CPU0 CPU1 [ 32.619995] ---- ---- [ 32.624635] lock(_xmit_NETROM); [ 32.628297] lock(&(&q->lock)->rlock); [ 32.634996] lock(_xmit_NETROM); [ 32.641170] lock(&(&q->lock)->rlock); [ 32.645379] [ 32.645379] *** DEADLOCK *** [ 32.645379] [ 32.651432] 4 locks held by syz-executor065/2079: [ 32.656241] #0: (rcu_read_lock_bh){......}, at: [] ip_finish_output2+0x20b/0x1100 [ 32.666190] #1: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x1d7/0x1c30 [ 32.676040] #2: (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 32.685357] #3: (rcu_read_lock){......}, at: [] dev_hard_start_xmit+0xa8/0x11c0 [ 32.695106] [ 32.695106] stack backtrace: [ 32.699580] CPU: 0 PID: 2079 Comm: syz-executor065 Not tainted 4.4.159+ #44 [ 32.706648] 0000000000000000 0be8f55a3964244b ffff8800b65a6d18 ffffffff81a994bd [ 32.714627] ffffffff83acc400 ffffffff83accac0 ffffffff83acc400 ffff8800b745e838 [ 32.722604] ffff8800b745df00 ffff8800b65a6d60 ffffffff813a84ea 0000000000000003 [ 32.730580] Call Trace: [ 32.733155] [] dump_stack+0xc1/0x124 [ 32.738504] [] print_circular_bug.cold.34+0x2f7/0x432 [ 32.745313] [] __lock_acquire+0x3e6c/0x5f10 [ 32.751252] [] ? trace_hardirqs_on+0x10/0x10 [ 32.757278] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 32.764170] [] ? trace_hardirqs_on_caller+0x266/0x590 [ 32.770993] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.777727] [] ? mod_timer+0x433/0x8f0 [ 32.783317] [] lock_acquire+0x15e/0x450 [ 32.788908] [] ? ip_defrag+0x31b/0x40c0 [ 32.794501] [] ? inet_frag_find+0x27a/0x9a0 [ 32.800440] [] _raw_spin_lock+0x36/0x50 [ 32.806036] [] ? ip_defrag+0x31b/0x40c0 [ 32.811635] [] ip_defrag+0x31b/0x40c0 [ 32.817063] [] ? trace_hardirqs_on+0x10/0x10 [ 32.823093] [] ? ipv4_frags_init_net+0x3a0/0x3a0 [ 32.829480] [] ip_check_defrag+0x3a7/0x710 [ 32.835330] [] ? ip_defrag+0x40c0/0x40c0 [ 32.841018] [] packet_rcv_fanout+0x52a/0x5e0 [ 32.847050] [] ? fanout_demux_rollover+0x4e0/0x4e0 [ 32.853599] [] dev_hard_start_xmit+0x650/0x11c0 [ 32.859970] [] ? dev_hard_start_xmit+0xa8/0x11c0 [ 32.866371] [] sch_direct_xmit+0x2b8/0x6c0 [ 32.872265] [] ? dev_deactivate_queue.constprop.6+0x160/0x160 [ 32.879781] [] __dev_queue_xmit+0xf95/0x1c30 [ 32.885808] [] ? __dev_queue_xmit+0x1d7/0x1c30 [ 32.892007] [] ? trace_hardirqs_on+0x10/0x10 [ 32.898036] [] ? netdev_pick_tx+0x2c0/0x2c0 [ 32.903983] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.910707] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.917430] [] ? memcpy+0x45/0x50 [ 32.922504] [] dev_queue_xmit+0x17/0x20 [ 32.928110] [] neigh_resolve_output+0x600/0x780 [ 32.934405] [] ? ip_finish_output2+0x8f0/0x1100 [ 32.940800] [] ip_finish_output2+0x8f0/0x1100 [ 32.946928] [] ? ip_finish_output2+0x20b/0x1100 [ 32.953226] [] ? nf_ct_deliver_cached_events+0x335/0x560 [ 32.960293] [] ? nf_ct_deliver_cached_events+0x83/0x560 [ 32.967275] [] ? nf_conntrack_seqadj_fini+0x20/0x20 [ 32.973909] [] ? ip_send_check+0xb0/0xb0 [ 32.979586] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.986306] [] ? ip_options_fragment+0x1ac/0x280 [ 32.992680] [] ip_do_fragment+0x1870/0x1f60 [ 32.998656] [] ? ip_send_check+0xb0/0xb0 [ 33.004343] [] ip_fragment.constprop.5+0x145/0x200 [ 33.010889] [] ip_finish_output+0x396/0xc00 [ 33.016913] [] ip_mc_output+0x237/0x980 [ 33.022520] [] ? ip_queue_xmit+0x1a80/0x1a80 [ 33.028552] [] ? ip_make_skb+0x116/0x210 [ 33.034233] [] ? ip_fragment.constprop.5+0x200/0x200 [ 33.040967] [] ? ip_flush_pending_frames+0x30/0x30 [ 33.047517] [] ip_local_out+0x9b/0x180 [ 33.053036] [] ip_send_skb+0x3c/0xc0 [ 33.058385] [] udp_send_skb+0x503/0xc70 [ 33.063982] [] udp_sendmsg+0x16c9/0x1c70 [ 33.069662] [] ? ip_reply_glue_bits+0xc0/0xc0 [ 33.075773] [] ? udp_lib_unhash+0x630/0x630 [ 33.081717] [] ? trace_hardirqs_on+0x10/0x10 [ 33.087758] [] ? sock_has_perm+0x1c1/0x3f0 [ 33.093612] [] ? sock_has_perm+0x2a1/0x3f0 [ 33.099468] [] ? sock_has_perm+0x9f/0x3f0 [ 33.105237] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 33.111960] [] ? check_preemption_disabled+0x3b/0x170 [ 33.118765] [] ? inet_sendmsg+0x143/0x4d0 [ 33.124643] [] inet_sendmsg+0x203/0x4d0 [ 33.130257] [] ? inet_sendmsg+0x73/0x4d0 [ 33.136027] [] ? inet_recvmsg+0x4c0/0x4c0 [ 33.141980] [] sock_sendmsg+0xbb/0x110 [ 33.147485] [] SyS_sendto+0x220/0x370 [ 33.152902] [] ? SyS_getpeername+0x2d0/0x2d0 [ 33.158962] [] ? _raw_spin_unlock+0x2c/0x50 [ 33.164907] [] ? handle_mm_fault+0x49a/0x2f30 [ 33.171019] [] ? SyS_accept+0x30/0x30 [ 33.176440] [] ? get_unused_fd_flags+0xd0/0xd0 [ 33.182644] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 33.189375] [] ? __do_page_fault+0x2b6/0x7e0 [ 33.195402] [] ? do_fast_syscall_32+0xdb/0xa80 [ 33.201621] [] ? SyS_getpeername+0x2d0/0x2d0 [ 33.207666] [] do_fast_syscall_32+0x31e/0xa80 [ 33.213793] [] sysenter_flags_fixed+0xd/0x1a