====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #220 Not tainted ------------------------------------------------------ syz-executor5/5368 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<00000000d0c7b9b5>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET6){+.+.}, at: [<00000000d0c7b9b5>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000ac59abd5>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1607 tee_tg_check+0x1a0/0x280 net/netfilter/xt_TEE.c:106 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv6/netfilter/ip6_tables.c:533 [inline] find_check_entry.isra.7+0x935/0xcf0 net/ipv6/netfilter/ip6_tables.c:575 translate_table+0xf52/0x1690 net/ipv6/netfilter/ip6_tables.c:744 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline] do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:928 rawv6_setsockopt+0x4a/0xf0 net/ipv6/raw.c:1060 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (sk_lock-AF_INET6){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x150 net/ipv6/ipv6_sockglue.c:922 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET6); lock(rtnl_mutex); lock(sk_lock-AF_INET6); *** DEADLOCK *** 1 lock held by syz-executor5/5368: #0: (rtnl_mutex){+.+.}, at: [<00000000ac59abd5>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5368 Comm: syz-executor5 Not tainted 4.15.0+ #220 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x150 net/ipv6/ipv6_sockglue.c:922 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f3641a5ec58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bf58 RCX: 0000000000453299 RDX: 000000000000002a RSI: 0000000000000029 RDI: 0000000000000013 RBP: 00000000000000e5 R08: 0000000000000088 R09: 0000000000000000 R10: 00000000207b3000 R11: 0000000000000212 R12: 00000000006f0618 R13: 00000000ffffffff R14: 00007f3641a5f6d4 R15: 0000000000000002 audit: type=1400 audit(1517676399.840:14): avc: denied { create } for pid=5351 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1517676399.843:15): avc: denied { write } for pid=5351 comm="syz-executor7" path="socket:[14850]" dev="sockfs" ino=14850 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. syz-executor1 uses obsolete (PF_INET,SOCK_PACKET) netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 'syz-executor4': attribute type 21 has an invalid length. audit: type=1400 audit(1517676400.667:16): avc: denied { prog_load } for pid=5429 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(1517676400.705:17): avc: denied { prog_run } for pid=5429 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(1517676400.770:18): avc: denied { name_bind } for pid=5451 comm="syz-executor3" src=20013 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517676400.770:19): avc: denied { node_bind } for pid=5451 comm="syz-executor3" saddr=255.255.255.255 src=20013 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517676400.774:20): avc: denied { name_connect } for pid=5451 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517676400.922:21): avc: denied { ioctl } for pid=5480 comm="syz-executor0" path="socket:[13967]" dev="sockfs" ino=13967 ioctlcmd=0x8921 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=sock_file permissive=1 audit: type=1400 audit(1517676400.936:22): avc: denied { accept } for pid=5480 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 audit: type=1400 audit(1517676400.992:23): avc: denied { create } for pid=5521 comm="syz-executor5" 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=1 audit: type=1400 audit(1517676401.025:24): avc: denied { getopt } for pid=5521 comm="syz-executor5" 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=1 audit: type=1400 audit(1517676401.104:25): avc: denied { map_create } for pid=5557 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 ip6_tables: ip6tables: counters copy to user failed while replacing table ip6_tables: ip6tables: counters copy to user failed while replacing table netlink: 'syz-executor1': attribute type 3 has an invalid length. netlink: 'syz-executor1': attribute type 3 has an invalid length. can: request_module (can-proto-6) failed. can: request_module (can-proto-6) failed. sctp: [Deprecated]: syz-executor7 (pid 5829) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead xt_limit: Overflow, try lower: 4294967293/4294962286 xt_limit: Overflow, try lower: 4294967293/4294962286 netlink: 'syz-executor0': attribute type 1 has an invalid length. dccp_invalid_packet: P.Data Offset(172) too large xt_l2tp: missing protocol rule (udp|l2tpip) xt_l2tp: missing protocol rule (udp|l2tpip) dccp_invalid_packet: P.Data Offset(172) too large netlink: 964 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 964 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 'syz-executor5': attribute type 21 has an invalid length. netlink: 'syz-executor5': attribute type 21 has an invalid length. xt_cluster: this node mask cannot be higher than the total number of nodes TCP: request_sock_TCP: Possible SYN flooding on port 20009. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20022. Sending cookies. Check SNMP counters. xt_l2tp: invalid flags combination: 0 xt_l2tp: invalid flags combination: 0 ipt_REJECT: TCP_RESET invalid for non-tcp ipt_REJECT: TCP_RESET invalid for non-tcp skbuff: bad partial csum: csum=65535/65535 len=14 skbuff: bad partial csum: csum=65535/65535 len=14 xt_CT: You must specify a L4 protocol, and not use inversions on it. netlink: 'syz-executor2': attribute type 21 has an invalid length. xt_CT: You must specify a L4 protocol, and not use inversions on it. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. x_tables: ip6_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip6_tables: TCPOPTSTRIP target: only valid in mangle table, not raw IPv4: Oversized IP packet from 127.0.0.1 Dead loop on virtual device ip6_vti0, fix it urgently! Dead loop on virtual device ip6_vti0, fix it urgently! kauditd_printk_skb: 20 callbacks suppressed audit: type=1400 audit(1517676405.813:46): avc: denied { net_bind_service } for pid=7379 comm="syz-executor2" capability=10 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 sctp: [Deprecated]: syz-executor4 (pid 7453) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor4 (pid 7474) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. audit: type=1400 audit(1517676406.331:47): avc: denied { bind } for pid=7587 comm="syz-executor1" 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=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. RDS: rds_bind could not find a transport for 0.0.0.39, load rds_tcp or rds_rdma? netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. dccp_close: ABORT with 127 bytes unread device syz7 entered promiscuous mode audit: type=1400 audit(1517676406.877:48): avc: denied { setopt } for pid=7758 comm="syz-executor5" 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=1 device syz7 left promiscuous mode xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. netlink: 'syz-executor3': attribute type 1 has an invalid length. atomic_op 00000000aaed322b conn xmit_atomic (null) sctp: [Deprecated]: syz-executor3 (pid 8165) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 'syz-executor6': attribute type 21 has an invalid length. sctp: [Deprecated]: syz-executor3 (pid 8165) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. sctp: [Deprecated]: syz-executor0 (pid 8333) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead SELinux: unrecognized netlink message: protocol=0 nlmsg_type=29779 sclass=netlink_route_socket pig=8352 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=29779 sclass=netlink_route_socket pig=8363 comm=syz-executor6 netlink: 3 bytes leftover after parsing attributes in process `syz-executor0'. device bridge0 entered promiscuous mode device bridge0 left promiscuous mode A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. device syz1 entered promiscuous mode x_tables: ip6_tables: TCPOPTSTRIP target: only valid in mangle table, not raw audit: type=1400 audit(1517676409.310:49): avc: denied { create } for pid=8624 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 audit: type=1400 audit(1517676409.356:50): avc: denied { write } for pid=8624 comm="syz-executor2" path="socket:[18315]" dev="sockfs" ino=18315 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 audit: type=1400 audit(1517676409.360:51): avc: denied { getattr } for pid=8624 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium xt_cgroup: invalid path, errno=-2 xt_cgroup: invalid path, errno=-2 audit: type=1400 audit(1517676409.692:52): avc: denied { bind } for pid=8763 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 IPv6: NLM_F_CREATE should be specified when creating new route IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found