====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #4 Not tainted ------------------------------------------------------- syz-executor.2/20365 is trying to acquire lock: (_xmit_NETROM){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] (_xmit_NETROM){+.-...}, at: [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 but task is already holding lock: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] (&(&q->lock)->rlock){+.-...}, at: [] ipv6_frag_rcv+0x6cc/0x51e0 net/ipv6/reassembly.c:528 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [inline] [] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] pgd_dtor arch/x86/mm/pgtable.c:142 [inline] [] pgd_free+0x2d/0x270 arch/x86/mm/pgtable.c:408 [] mm_free_pgd kernel/fork.c:554 [inline] [] __mmdrop+0x69/0x1c0 kernel/fork.c:700 [] mmdrop include/linux/sched.h:2794 [inline] [] finish_task_switch+0x20d/0x660 kernel/sched/core.c:2683 [] context_switch kernel/sched/core.c:2807 [inline] [] __schedule+0x7e3/0x1ee0 kernel/sched/core.c:3326 [] preempt_schedule_common+0x41/0x70 kernel/sched/core.c:3396 [] preempt_schedule+0x24/0x30 kernel/sched/core.c:3421 [] ___preempt_schedule+0x12/0x14 [] spin_unlock_irqrestore include/linux/spinlock.h:362 [inline] [] __wake_up_sync_key+0x4b/0x60 kernel/sched/wait.c:146 [] pipe_read+0x5a0/0x860 fs/pipe.c:321 audit: type=1400 audit(1574979580.882:836): avc: denied { create } for pid=20372 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 [] new_sync_read fs/read_write.c:424 [inline] [] __vfs_read+0x2e5/0x3c0 fs/read_write.c:436 [] vfs_read+0x134/0x360 fs/read_write.c:456 [] SYSC_read fs/read_write.c:571 [inline] [] SyS_read+0xdc/0x1c0 fs/read_write.c:564 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [inline] [] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 [] __dev_xmit_skb net/core/dev.c:2979 [inline] [] __dev_queue_xmit+0xd24/0x1bb0 net/core/dev.c:3197 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_resolve_output+0x4a0/0x7a0 net/core/neighbour.c:1329 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ndisc_send_skb+0x98d/0x1110 net/ipv6/ndisc.c:471 [] ndisc_send_ns+0x4bf/0x6b0 net/ipv6/ndisc.c:595 [] ndisc_solicit+0x2b2/0x440 net/ipv6/ndisc.c:686 [] neigh_probe+0xc8/0x100 net/core/neighbour.c:871 [] __neigh_event_send+0x2ab/0xc50 net/core/neighbour.c:1027 [] neigh_event_send include/net/neighbour.h:431 [inline] [] neigh_resolve_output+0x5ec/0x7a0 net/core/neighbour.c:1313 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] ip6_local_out+0x9c/0x180 net/ipv6/output_core.c:169 [] ip6_send_skb+0xa2/0x340 net/ipv6/ip6_output.c:1725 [] ip6_push_pending_frames+0xbb/0xe0 net/ipv6/ip6_output.c:1745 [] icmpv6_push_pending_frames+0x336/0x530 net/ipv6/icmp.c:276 [] icmp6_send+0x1506/0x1b40 net/ipv6/icmp.c:537 [] icmpv6_param_prob+0x29/0x40 net/ipv6/icmp.c:551 [] ip6_frag_queue net/ipv6/reassembly.c:190 [inline] [] ipv6_frag_rcv+0x3ce5/0x51e0 net/ipv6/reassembly.c:531 [] ip6_input_finish+0x57d/0x14f0 net/ipv6/ip6_input.c:248 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_input+0xf8/0x1f0 net/ipv6/ip6_input.c:280 [] dst_input include/net/dst.h:504 [inline] [] ip6_rcv_finish+0x14d/0x670 net/ipv6/ip6_input.c:62 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ipv6_rcv+0xfc1/0x1a20 net/ipv6/ip6_input.c:186 [] __netif_receive_skb_core+0x1300/0x2950 net/core/dev.c:4041 [] __netif_receive_skb+0x58/0x1c0 net/core/dev.c:4076 [] process_backlog+0x200/0x630 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd30 net/core/dev.c:4976 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.0+0x54/0x60 kernel/softirq.c:317 [] do_softirq+0x18/0x20 kernel/softirq.c:305 [] netif_rx_ni+0xeb/0x3b0 net/core/dev.c:3675 [] tun_get_user+0xdbf/0x2640 drivers/net/tun.c:1264 [] tun_chr_write_iter+0xda/0x190 drivers/net/tun.c:1283 [] do_iter_readv_writev+0x141/0x1e0 fs/read_write.c:666 [] do_readv_writev+0x387/0x6e0 fs/read_write.c:810 [] vfs_writev+0x7d/0xb0 fs/read_write.c:849 [] SYSC_writev fs/read_write.c:882 [inline] [] SyS_writev+0xdc/0x260 fs/read_write.c:874 [] entry_SYSCALL_64_fastpath+0x1e/0x9a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&q->lock)->rlock); lock(_xmit_NETROM); lock(&(&q->lock)->rlock); lock(_xmit_NETROM); *** DEADLOCK *** 9 locks held by syz-executor.2/20365: #0: (rcu_read_lock){......}, at: [] __skb_unlink include/linux/skbuff.h:1648 [inline] #0: (rcu_read_lock){......}, at: [] __skb_dequeue include/linux/skbuff.h:1664 [inline] #0: (rcu_read_lock){......}, at: [] process_backlog+0x19c/0x630 net/core/dev.c:4670 #1: (rcu_read_lock){......}, at: [] ip6_input_finish+0x0/0x14f0 net/ipv6/ip6_input.c:55 #2: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] #2: (&(&q->lock)->rlock){+.-...}, at: [] ipv6_frag_rcv+0x6cc/0x51e0 net/ipv6/reassembly.c:528 #3: (slock-AF_INET6){+.-...}, at: [] spin_trylock include/linux/spinlock.h:312 [inline] #3: (slock-AF_INET6){+.-...}, at: [] icmpv6_xmit_lock net/ipv6/icmp.c:120 [inline] #3: (slock-AF_INET6){+.-...}, at: [] icmp6_send+0x7bd/0x1b40 net/ipv6/icmp.c:485 #4: (rcu_read_lock){......}, at: [] icmp6_send+0xf44/0x1b40 net/ipv6/icmp.c:517 #5: (rcu_read_lock_bh){......}, at: [] ip6_finish_output2+0x1e1/0x1dc0 net/ipv6/ip6_output.c:71 #6: (rcu_read_lock){......}, at: [] ip6_nd_hdr net/ipv6/ndisc.c:427 [inline] #6: (rcu_read_lock){......}, at: [] ndisc_send_skb+0x779/0x1110 net/ipv6/ndisc.c:465 #7: (rcu_read_lock_bh){......}, at: [] ip6_finish_output2+0x1e1/0x1dc0 net/ipv6/ip6_output.c:71 #8: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x1d7/0x1bb0 net/core/dev.c:3161 stack backtrace: CPU: 1 PID: 20365 Comm: syz-executor.2 Not tainted 4.4.174+ #4 0000000000000000 11697da4bdee24ce ffff8801db7064e0 ffffffff81aad1a1 ffffffff84057a80 ffff88016e12c740 ffffffff83ad5520 ffffffff83aeb270 ffffffff83ad5520 ffff8801db706530 ffffffff813abcda ffff8801db706610 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [inline] [] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 [] __dev_xmit_skb net/core/dev.c:2979 [inline] [] __dev_queue_xmit+0xd24/0x1bb0 net/core/dev.c:3197 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_resolve_output+0x4a0/0x7a0 net/core/neighbour.c:1329 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ndisc_send_skb+0x98d/0x1110 net/ipv6/ndisc.c:471 [] ndisc_send_ns+0x4bf/0x6b0 net/ipv6/ndisc.c:595 [] ndisc_solicit+0x2b2/0x440 net/ipv6/ndisc.c:686 [] neigh_probe+0xc8/0x100 net/core/neighbour.c:871 [] __neigh_event_send+0x2ab/0xc50 net/core/neighbour.c:1027 [] neigh_event_send include/net/neighbour.h:431 [inline] [] neigh_resolve_output+0x5ec/0x7a0 net/core/neighbour.c:1313 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] ip6_local_out+0x9c/0x180 net/ipv6/output_core.c:169 [] ip6_send_skb+0xa2/0x340 net/ipv6/ip6_output.c:1725 [] ip6_push_pending_frames+0xbb/0xe0 net/ipv6/ip6_output.c:1745 [] icmpv6_push_pending_frames+0x336/0x530 net/ipv6/icmp.c:276 [] icmp6_send+0x1506/0x1b40 net/ipv6/icmp.c:537 [] icmpv6_param_prob+0x29/0x40 net/ipv6/icmp.c:551 [] ip6_frag_queue net/ipv6/reassembly.c:190 [inline] [] ipv6_frag_rcv+0x3ce5/0x51e0 net/ipv6/reassembly.c:531 [] ip6_input_finish+0x57d/0x14f0 net/ipv6/ip6_input.c:248 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_input+0xf8/0x1f0 net/ipv6/ip6_input.c:280 [] dst_input include/net/dst.h:504 [inline] [] ip6_rcv_finish+0x14d/0x670 net/ipv6/ip6_input.c:62 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ipv6_rcv+0xfc1/0x1a20 net/ipv6/ip6_input.c:186 [] __netif_receive_skb_core+0x1300/0x2950 net/core/dev.c:4041 [] __netif_receive_skb+0x58/0x1c0 net/core/dev.c:4076 [] process_backlog+0x200/0x630 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd30 net/core/dev.c:4976 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.0+0x54/0x60 kernel/softirq.c:317 [] do_softirq+0x18/0x20 kernel/softirq.c:305 [] netif_rx_ni+0xeb/0x3b0 net/core/dev.c:3675 [] tun_get_user+0xdbf/0x2640 drivers/net/tun.c:1264 [] tun_chr_write_iter+0xda/0x190 drivers/net/tun.c:1283 [] do_iter_readv_writev+0x141/0x1e0 fs/read_write.c:666 [] do_readv_writev+0x387/0x6e0 fs/read_write.c:810 [] vfs_writev+0x7d/0xb0 fs/read_write.c:849 [] SYSC_writev fs/read_write.c:882 [inline] [] SyS_writev+0xdc/0x260 fs/read_write.c:874 [] entry_SYSCALL_64_fastpath+0x1e/0x9a hid-generic 0000:0000:0000.0101: item fetching failed at offset -630099655 hid-generic: probe of 0000:0000:0000.0101 failed with error -22 audit: type=1400 audit(1574979582.622:837): avc: denied { create } for pid=20407 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574979582.972:838): avc: denied { create } for pid=20418 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 hid-generic 0000:0000:0000.0102: item fetching failed at offset -663612215 hid-generic: probe of 0000:0000:0000.0102 failed with error -22 audit: type=1400 audit(1574979585.682:839): avc: denied { create } for pid=20455 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574979585.682:840): avc: denied { create } for pid=20458 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 hid-generic 0000:0000:0000.0103: item fetching failed at offset 2679361 hid-generic: probe of 0000:0000:0000.0103 failed with error -22 audit: type=1400 audit(1574979588.742:841): avc: denied { create } for pid=20504 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574979588.792:842): avc: denied { create } for pid=20507 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0