====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #220 Not tainted Cannot find add_set index 0 as target Cannot find add_set index 0 as target ------------------------------------------------------ syz-executor0/5451 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<0000000080806c49>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET6){+.+.}, at: [<0000000080806c49>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000006624e157>] 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-executor0/5451: #0: (rtnl_mutex){+.+.}, at: [<000000006624e157>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5451 Comm: syz-executor0 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:00007f09f8131c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 000000000000002f RSI: 0000000000000029 RDI: 0000000000000013 RBP: 00000000000005ca R08: 0000000000000108 R09: 0000000000000000 R10: 0000000020000fac R11: 0000000000000212 R12: 00000000006f7b90 R13: 00000000ffffffff R14: 00007f09f81326d4 R15: 0000000000000000 dccp_close: ABORT with 1 bytes unread Cannot find set identified by id 0 to match netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. syz-executor0 uses obsolete (PF_INET,SOCK_PACKET) Cannot find set identified by id 0 to match ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' openvswitch: netlink: Message has 8 unknown bytes. netlink: 4 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor5'. IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. openvswitch: netlink: Message has 8 unknown bytes. TCP: request_sock_TCPv6: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. ipt_ECN: new ECT codepoint 9f out of mask ipt_ECN: new ECT codepoint 9f out of mask netlink: 'syz-executor7': attribute type 1 has an invalid length. ieee80211 phy4: Selected rate control algorithm 'minstrel_ht' ieee80211 phy5: Selected rate control algorithm 'minstrel_ht' netlink: 'syz-executor4': attribute type 1 has an invalid length. ip6t_REJECT: TCP_RESET illegal for non-tcp ip6t_REJECT: TCP_RESET illegal for non-tcp netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 7 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 'syz-executor5': attribute type 33 has an invalid length. netlink: 'syz-executor5': attribute type 33 has an invalid length. 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 netlink: 'syz-executor4': attribute type 21 has an invalid length. IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route xt_TPROXY: Can be used only in combination with either -p tcp or -p udp xt_TPROXY: Can be used only in combination with either -p tcp or -p udp Cannot find set identified by id 0 to match kauditd_printk_skb: 23 callbacks suppressed audit: type=1400 audit(1517679642.696:45): avc: denied { getopt } for pid=6535 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=netlink_generic_socket permissive=1 audit: type=1400 audit(1517679642.841:46): avc: denied { getattr } for pid=6567 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_netfilter_socket permissive=1 audit: type=1400 audit(1517679642.961:47): avc: denied { listen } for pid=6590 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 ipt_ECN: new ECT codepoint 9f out of mask ipt_ECN: new ECT codepoint 9f out of mask xt_hashlimit: hashlimit invalid rate audit: type=1400 audit(1517679643.308:48): avc: denied { read } for pid=6716 comm="syz-executor3" 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(1517679643.310:49): avc: denied { map } for pid=6710 comm="syz-executor7" path="socket:[16406]" dev="sockfs" ino=16406 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=tcp_socket permissive=1 device syz6 entered promiscuous mode device syz6 left promiscuous mode audit: type=1400 audit(1517679643.567:50): avc: denied { setopt } for pid=6837 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 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. audit: type=1400 audit(1517679643.703:51): avc: denied { ioctl } for pid=6879 comm="syz-executor7" path="socket:[16213]" dev="sockfs" ino=16213 ioctlcmd=0x5451 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 audit: type=1400 audit(1517679643.758:52): avc: denied { prog_run } for pid=6901 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=bpf permissive=1 Cannot find add_set index 0 as target Cannot find add_set index 0 as target RDS: rds_bind could not find a transport for 172.20.0.170, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 172.20.0.170, load rds_tcp or rds_rdma? audit: type=1400 audit(1517679643.978:53): avc: denied { map } for pid=6982 comm="syz-executor5" path="socket:[16607]" dev="sockfs" ino=16607 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=packet_socket permissive=1 audit: type=1400 audit(1517679643.978:54): avc: denied { map } for pid=6976 comm="syz-executor3" path="socket:[16284]" dev="sockfs" ino=16284 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=rawip_socket permissive=1 can: request_module (can-proto-6) failed. can: request_module (can-proto-6) failed. sctp: [Deprecated]: syz-executor7 (pid 7134) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead ieee80211 phy6: Selected rate control algorithm 'minstrel_ht' sctp: [Deprecated]: syz-executor7 (pid 7164) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead TCP: request_sock_TCPv6: Possible SYN flooding on port 20022. Sending cookies. Check SNMP counters. sctp: [Deprecated]: syz-executor5 (pid 7713) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_cgroup: both path and classid specified xt_cgroup: both path and classid specified sctp: [Deprecated]: syz-executor5 (pid 7729) Use of int in maxseg socket option. Use struct sctp_assoc_value instead IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route validate_nla: 7 callbacks suppressed netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 'syz-executor7': attribute type 6 has an invalid length. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 'syz-executor7': attribute type 6 has an invalid length. syz-executor5 (7933) used greatest stack depth: 14368 bytes left ip6t_REJECT: ECHOREPLY is not supported. ip6t_REJECT: ECHOREPLY is not supported. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=62998 sclass=netlink_route_socket pig=8143 comm=syz-executor3 IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route IPv6: NLM_F_CREATE should be set when creating new route IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE SELinux: unrecognized netlink message: protocol=0 nlmsg_type=62998 sclass=netlink_route_socket pig=8167 comm=syz-executor3 syz-executor5 (8410) used greatest stack depth: 13904 bytes left net_ratelimit: 5 callbacks suppressed skbuff: bad partial csum: csum=65535/65535 len=14 RDS: rds_bind could not find a transport for 224.0.0.2, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 224.0.0.2, load rds_tcp or rds_rdma? Cannot find set identified by id 0 to match Cannot find set identified by id 0 to match kauditd_printk_skb: 4 callbacks suppressed audit: type=1400 audit(1517679647.945:59): avc: denied { read } for pid=8471 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_netfilter_socket permissive=1 mip6: mip6_rthdr_init_state: state's mode is not 2: 0 mip6: mip6_rthdr_init_state: state's mode is not 2: 0 ieee80211 phy7: Selected rate control algorithm 'minstrel_ht' ieee80211 phy8: Selected rate control algorithm 'minstrel_ht' TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 'syz-executor1': attribute type 1 has an invalid length. netlink: 'syz-executor2': attribute type 8 has an invalid length. device syz6 entered promiscuous mode device syz6 left promiscuous mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=45287 sclass=netlink_route_socket pig=8813 comm=syz-executor4 tc_ctl_action: received NO action attribs netlink: 'syz-executor0': attribute type 21 has an invalid length. netlink: 'syz-executor0': attribute type 4 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=45287 sclass=netlink_route_socket pig=8825 comm=syz-executor4 Cannot find set identified by id 0 to match nla_parse: 14 callbacks suppressed netlink: 216 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 216 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 216 bytes leftover after parsing attributes in process `syz-executor3'.