audit: type=1400 audit(1574920958.432:851): avc: denied { create } for pid=28493 comm="syz-executor.0" 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 ====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #4 Not tainted ------------------------------------------------------- syz-executor.5/28500 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_bh include/linux/spinlock_api_smp.h:137 [inline] [] _raw_spin_lock_bh+0x3c/0x50 kernel/locking/spinlock.c:175 [] spin_lock_bh include/linux/spinlock.h:307 [inline] [] wb_wakeup_delayed+0x5d/0xd0 mm/backing-dev.c:278 [] __mark_inode_dirty+0x75b/0x1360 fs/fs-writeback.c:2144 [] mark_buffer_dirty+0x19f/0x4d0 fs/buffer.c:1189 [] __block_commit_write.isra.0+0x135/0x1b0 fs/buffer.c:2006 [] block_commit_write fs/buffer.c:2402 [inline] [] block_page_mkwrite+0x21a/0x270 fs/buffer.c:2451 [] ext4_page_mkwrite+0xb80/0xef0 fs/ext4/inode.c:5483 [] do_page_mkwrite+0x1d2/0x360 mm/memory.c:2057 [] wp_page_shared mm/memory.c:2327 [inline] [] do_wp_page+0xb5c/0x1340 mm/memory.c:2431 [] handle_pte_fault mm/memory.c:3362 [inline] [] __handle_mm_fault mm/memory.c:3474 [inline] [] handle_mm_fault+0x1614/0x3140 mm/memory.c:3503 [] __do_page_fault+0x28e/0x7f0 arch/x86/mm/fault.c:1243 [] do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1306 [] page_fault+0x25/0x30 arch/x86/entry/entry_64.S:1064 [] 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_hh_output include/net/neighbour.h:486 [inline] [] dst_neigh_output include/net/dst.h:459 [inline] [] ip6_finish_output2+0xe4a/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:225 [inline] [] ipv6_frag_rcv+0x3f06/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.5/28500: #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: 0 PID: 28500 Comm: syz-executor.5 Not tainted 4.4.174+ #4 0000000000000000 da70373c636d131f ffff8801db606570 ffffffff81aad1a1 ffffffff84057a80 ffff8801d1970000 ffffffff83ad51c0 ffffffff83aeb0c0 ffffffff83ad51c0 ffff8801db6065c0 ffffffff813abcda ffff8801db6066a0 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 audit: type=1400 audit(1574920958.492:852): avc: denied { create } for pid=28493 comm="syz-executor.0" 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 [] __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_hh_output include/net/neighbour.h:486 [inline] [] dst_neigh_output include/net/dst.h:459 [inline] [] ip6_finish_output2+0xe4a/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:225 [inline] [] ipv6_frag_rcv+0x3f06/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 uinput: write device info first netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1400 audit(1574920959.802:853): avc: denied { create } for pid=28543 comm="syz-executor.0" 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1400 audit(1574920960.362:854): avc: denied { create } for pid=28579 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(1574920960.382:855): avc: denied { create } for pid=28579 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. SELinux: unrecognized netlink message: protocol=4 nlmsg_type=0 sclass=netlink_tcpdiag_socket audit: type=1400 audit(1574920960.412:856): avc: denied { create } for pid=28579 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 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=0 sclass=netlink_tcpdiag_socket audit: type=1400 audit(1574920960.462:857): avc: denied { create } for pid=28579 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(1574920960.492:858): avc: denied { create } for pid=28587 comm="syz-executor.0" 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1400 audit(1574920961.162:859): avc: denied { create } for pid=28629 comm="syz-executor.0" 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(1574920961.322:860): avc: denied { create } for pid=28639 comm="syz-executor.1" 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(1574920961.522:861): avc: denied { create } for pid=28639 comm="syz-executor.1" 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=88 sclass=netlink_xfrm_socket audit: type=1400 audit(1574920962.662:862): avc: denied { create } for pid=28724 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(1574920962.712:863): avc: denied { create } for pid=28724 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 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=88 sclass=netlink_xfrm_socket nla_parse: 7 callbacks suppressed netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=255 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=255 sclass=netlink_xfrm_socket netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=0 sclass=netlink_xfrm_socket audit: type=1400 audit(1574920966.922:864): avc: denied { create } for pid=29058 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.1'.