[....] Starting enhanced syslogd: rsyslogd[ 13.437585] audit: type=1400 audit(1538829641.552:4): avc: denied { syslog } for pid=1917 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.91' (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: [ 36.947075] [ 36.948710] ====================================================== [ 36.955006] [ INFO: possible circular locking dependency detected ] [ 36.961393] 4.4.159+ #44 Not tainted [ 36.965090] ------------------------------------------------------- [ 36.971534] syz-executor141/2077 is trying to acquire lock: [ 36.977221] (&(&q->lock)->rlock){+.-...}, at: [] ip_defrag+0x31b/0x40c0 [ 36.986099] [ 36.986099] but task is already holding lock: [ 36.992044] (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 37.000914] [ 37.000914] which lock already depends on the new lock. [ 37.000914] [ 37.009202] [ 37.009202] the existing dependency chain (in reverse order) is: [ 37.016791] -> #1 (_xmit_NETROM){+.-...}: [ 37.021653] [] lock_acquire+0x15e/0x450 [ 37.027989] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 37.034931] [] depot_save_stack+0x20b/0x5eb [ 37.041534] [] kasan_kmalloc.part.1+0xc9/0xf0 [ 37.048314] [] kasan_kmalloc+0xaf/0xc0 [ 37.054466] [] kasan_slab_alloc+0x12/0x20 [ 37.060988] [] kmem_cache_alloc+0xdc/0x2c0 [ 37.067492] [] inet_getpeer+0x159d/0x1d70 [ 37.073917] [] icmp6_send+0x17b7/0x1b70 [ 37.080164] [] icmpv6_param_prob+0x29/0x40 [ 37.086670] [] ipv6_frag_rcv+0x3de6/0x4f80 [ 37.093317] [] ip6_input_finish+0x57d/0x1510 [ 37.100117] [] ip6_input+0xf6/0x200 [ 37.106014] [] ip6_rcv_finish+0x14e/0x670 [ 37.112445] [] ipv6_rcv+0x10b2/0x1d10 [ 37.118621] [] __netif_receive_skb_core+0x12c8/0x2820 [ 37.126095] [] __netif_receive_skb+0x5b/0x1c0 [ 37.132867] [] process_backlog+0x20a/0x670 [ 37.139375] [] net_rx_action+0x367/0xd50 [ 37.145720] [] __do_softirq+0x22c/0xa1a [ 37.151959] [] do_softirq_own_stack+0x1c/0x30 [ 37.158718] [] do_softirq.part.2+0x54/0x60 [ 37.165253] [] do_softirq+0x19/0x20 [ 37.171170] [] netif_rx_ni+0xec/0x3a0 [ 37.177233] [] tun_get_user+0xf3a/0x2690 [ 37.183566] [] tun_chr_write_iter+0xd5/0x190 [ 37.190247] [] do_iter_readv_writev+0x133/0x1d0 [ 37.197184] [] compat_do_readv_writev+0x337/0x6f0 [ 37.204423] [] compat_writev+0xe1/0x150 [ 37.210686] [] compat_SyS_writev+0xd8/0x1c0 [ 37.217271] [] do_fast_syscall_32+0x31e/0xa80 [ 37.224030] [] sysenter_flags_fixed+0xd/0x1a [ 37.230702] -> #0 (&(&q->lock)->rlock){+.-...}: [ 37.236046] [] __lock_acquire+0x3e6c/0x5f10 [ 37.242633] [] lock_acquire+0x15e/0x450 [ 37.248877] [] _raw_spin_lock+0x36/0x50 [ 37.255226] [] ip_defrag+0x31b/0x40c0 [ 37.261345] [] ip_check_defrag+0x3a7/0x710 [ 37.267853] [] packet_rcv_fanout+0x52a/0x5e0 [ 37.274527] [] dev_hard_start_xmit+0x650/0x11c0 [ 37.281575] [] sch_direct_xmit+0x2b8/0x6c0 [ 37.288075] [] __dev_queue_xmit+0xf95/0x1c30 [ 37.294751] [] dev_queue_xmit+0x17/0x20 [ 37.301107] [] neigh_resolve_output+0x600/0x780 [ 37.308067] [] ip_finish_output2+0x8f0/0x1100 [ 37.314841] [] ip_do_fragment+0x1870/0x1f60 [ 37.321500] [] ip_fragment.constprop.5+0x145/0x200 [ 37.328697] [] ip_finish_output+0x396/0xc00 [ 37.335335] [] ip_mc_output+0x237/0x980 [ 37.341578] [] ip_local_out+0x9b/0x180 [ 37.347739] [] ip_send_skb+0x3c/0xc0 [ 37.353717] [] udp_send_skb+0x503/0xc70 [ 37.359961] [] udp_sendmsg+0x16c9/0x1c70 [ 37.366290] [] inet_sendmsg+0x203/0x4d0 [ 37.372536] [] sock_sendmsg+0xbb/0x110 [ 37.378692] [] SyS_sendto+0x220/0x370 [ 37.384785] [] do_fast_syscall_32+0x31e/0xa80 [ 37.391561] [] sysenter_flags_fixed+0xd/0x1a [ 37.398233] [ 37.398233] other info that might help us debug this: [ 37.398233] [ 37.406351] Possible unsafe locking scenario: [ 37.406351] [ 37.412386] CPU0 CPU1 [ 37.417031] ---- ---- [ 37.421669] lock(_xmit_NETROM); [ 37.425332] lock(&(&q->lock)->rlock); [ 37.432041] lock(_xmit_NETROM); [ 37.438310] lock(&(&q->lock)->rlock); [ 37.442498] [ 37.442498] *** DEADLOCK *** [ 37.442498] [ 37.448531] 4 locks held by syz-executor141/2077: [ 37.453505] #0: (rcu_read_lock_bh){......}, at: [] ip_finish_output2+0x20b/0x1100 [ 37.463461] #1: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x1d7/0x1c30 [ 37.473322] #2: (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x233/0x6c0 [ 37.482958] #3: (rcu_read_lock){......}, at: [] dev_hard_start_xmit+0xa8/0x11c0 [ 37.492736] [ 37.492736] stack backtrace: [ 37.497262] CPU: 1 PID: 2077 Comm: syz-executor141 Not tainted 4.4.159+ #44 [ 37.504336] 0000000000000000 b170ce0449a42781 ffff8800b6af6d18 ffffffff81a994bd [ 37.512337] ffffffff83accac0 ffffffff83acd180 ffffffff83accac0 ffff8800b72d8938 [ 37.520327] ffff8800b72d8000 ffff8800b6af6d60 ffffffff813a84ea 0000000000000003 [ 37.528329] Call Trace: [ 37.530905] [] dump_stack+0xc1/0x124 [ 37.536296] [] print_circular_bug.cold.34+0x2f7/0x432 [ 37.543177] [] __lock_acquire+0x3e6c/0x5f10 [ 37.549130] [] ? trace_hardirqs_on+0x10/0x10 [ 37.555172] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 37.562134] [] ? trace_hardirqs_on_caller+0x266/0x590 [ 37.568965] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.575706] [] ? mod_timer+0x433/0x8f0 [ 37.581216] [] lock_acquire+0x15e/0x450 [ 37.586835] [] ? ip_defrag+0x31b/0x40c0 [ 37.592592] [] ? inet_frag_find+0x27a/0x9a0 [ 37.598543] [] _raw_spin_lock+0x36/0x50 [ 37.604159] [] ? ip_defrag+0x31b/0x40c0 [ 37.609762] [] ip_defrag+0x31b/0x40c0 [ 37.615193] [] ? trace_hardirqs_on+0x10/0x10 [ 37.621223] [] ? ipv4_frags_init_net+0x3a0/0x3a0 [ 37.627602] [] ip_check_defrag+0x3a7/0x710 [ 37.633516] [] ? ip_defrag+0x40c0/0x40c0 [ 37.639215] [] packet_rcv_fanout+0x52a/0x5e0 [ 37.645250] [] ? fanout_demux_rollover+0x4e0/0x4e0 [ 37.651816] [] dev_hard_start_xmit+0x650/0x11c0 [ 37.658118] [] ? dev_hard_start_xmit+0xa8/0x11c0 [ 37.664502] [] sch_direct_xmit+0x2b8/0x6c0 [ 37.670363] [] ? dev_deactivate_queue.constprop.6+0x160/0x160 [ 37.677892] [] __dev_queue_xmit+0xf95/0x1c30 [ 37.683936] [] ? __dev_queue_xmit+0x1d7/0x1c30 [ 37.690143] [] ? trace_hardirqs_on+0x10/0x10 [ 37.696274] [] ? netdev_pick_tx+0x2c0/0x2c0 [ 37.702226] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.708967] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.715704] [] ? memcpy+0x45/0x50 [ 37.720785] [] dev_queue_xmit+0x17/0x20 [ 37.726387] [] neigh_resolve_output+0x600/0x780 [ 37.732694] [] ? ip_finish_output2+0x8f0/0x1100 [ 37.738990] [] ip_finish_output2+0x8f0/0x1100 [ 37.745111] [] ? ip_finish_output2+0x20b/0x1100 [ 37.751407] [] ? nf_ct_deliver_cached_events+0x335/0x560 [ 37.758538] [] ? nf_ct_deliver_cached_events+0x83/0x560 [ 37.765696] [] ? nf_conntrack_seqadj_fini+0x20/0x20 [ 37.772355] [] ? ip_send_check+0xb0/0xb0 [ 37.778041] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.784773] [] ? ip_options_fragment+0x1ac/0x280 [ 37.791198] [] ip_do_fragment+0x1870/0x1f60 [ 37.797151] [] ? ip_send_check+0xb0/0xb0 [ 37.802838] [] ip_fragment.constprop.5+0x145/0x200 [ 37.809394] [] ip_finish_output+0x396/0xc00 [ 37.815342] [] ip_mc_output+0x237/0x980 [ 37.821006] [] ? ip_queue_xmit+0x1a80/0x1a80 [ 37.827052] [] ? ip_make_skb+0x116/0x210 [ 37.832738] [] ? ip_fragment.constprop.5+0x200/0x200 [ 37.839577] [] ? ip_flush_pending_frames+0x30/0x30 [ 37.846137] [] ip_local_out+0x9b/0x180 [ 37.851648] [] ip_send_skb+0x3c/0xc0 [ 37.857004] [] udp_send_skb+0x503/0xc70 [ 37.862783] [] udp_sendmsg+0x16c9/0x1c70 [ 37.868483] [] ? ip_reply_glue_bits+0xc0/0xc0 [ 37.874606] [] ? udp_lib_unhash+0x630/0x630 [ 37.880551] [] ? trace_hardirqs_on+0x10/0x10 [ 37.886585] [] ? sock_has_perm+0x1c1/0x3f0 [ 37.892449] [] ? sock_has_perm+0x2a1/0x3f0 [ 37.898312] [] ? sock_has_perm+0x9f/0x3f0 [ 37.904084] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.910814] [] ? check_preemption_disabled+0x3b/0x170 [ 37.917632] [] ? inet_sendmsg+0x143/0x4d0 [ 37.923413] [] inet_sendmsg+0x203/0x4d0 [ 37.929057] [] ? inet_sendmsg+0x73/0x4d0 [ 37.934748] [] ? inet_recvmsg+0x4c0/0x4c0 [ 37.940524] [] sock_sendmsg+0xbb/0x110 [ 37.946039] [] SyS_sendto+0x220/0x370 [ 37.951463] [] ? SyS_getpeername+0x2d0/0x2d0 [ 37.957496] [] ? _raw_spin_unlock+0x2c/0x50 [ 37.963447] [] ? handle_mm_fault+0x49a/0x2f30 [ 37.969570] [] ? SyS_accept+0x30/0x30 [ 37.975044] [] ? get_unused_fd_flags+0xd0/0xd0 [ 37.981257] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.987989] [] ? __do_page_fault+0x2b6/0x7e0 [ 37.994023] [] ? do_fast_syscall_32+0xdb/0xa80 [ 38.000275] [] ? SyS_getpeername+0x2d0/0x2d0 [ 38.006317] [] do_fast_syscall_32+0x31e/0xa80 [ 38.012485] [] sysenter_flags_fixed+0xd/0x1a