====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #220 Not tainted ------------------------------------------------------ syz-executor4/5196 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<00000000590d3c8f>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET6){+.+.}, at: [<00000000590d3c8f>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000000fe93c8e>] 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-executor4/5196: #0: (rtnl_mutex){+.+.}, at: [<000000000fe93c8e>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5196 Comm: syz-executor4 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:00007fd72a763c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000029 RDI: 0000000000000013 RBP: 00000000000004ba R08: 0000000000000410 R09: 0000000000000000 R10: 0000000020a56bf0 R11: 0000000000000212 R12: 00000000006f6210 R13: 00000000ffffffff R14: 00007fd72a7646d4 R15: 0000000000000000 Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable audit: type=1400 audit(1517675068.294:14): avc: denied { create } for pid=5209 comm="syz-executor4" 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(1517675068.297:15): avc: denied { ioctl } for pid=5209 comm="syz-executor4" path="socket:[14207]" dev="sockfs" ino=14207 ioctlcmd=0x48c9 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(1517675068.300:16): avc: denied { write } for pid=5209 comm="syz-executor4" path="socket:[14207]" dev="sockfs" ino=14207 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(1517675068.481:17): avc: denied { prog_load } for pid=5274 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=bpf permissive=1 sctp: [Deprecated]: syz-executor2 (pid 5310) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 5340) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1400 audit(1517675068.910:18): avc: denied { prog_run } for pid=5427 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(1517675068.945:19): avc: denied { map_create } for pid=5432 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=bpf permissive=1 audit: type=1400 audit(1517675069.011:20): avc: denied { map_read map_write } for pid=5479 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 audit: type=1400 audit(1517675069.111:21): avc: denied { create } for pid=5520 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_crypto_socket permissive=1 syz-executor1 (5536) used greatest stack depth: 15808 bytes left netlink: 17 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 17 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor6': attribute type 3 has an invalid length. netlink: 'syz-executor6': attribute type 3 has an invalid length. netlink: 'syz-executor2': attribute type 16 has an invalid length. netlink: 'syz-executor2': attribute type 16 has an invalid length. l2tp_core: tunl 59: sockfd_lookup(fd=0) returned -88 l2tp_core: tunl 59: sockfd_lookup(fd=0) returned -88 IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found netlink: 'syz-executor0': attribute type 2 has an invalid length. netlink: 'syz-executor0': attribute type 2 has an invalid length. Cannot find add_set index 2715 as target Cannot find add_set index 2715 as target openvswitch: netlink: Flow actions attr not present in new flow. openvswitch: netlink: Flow actions attr not present in new flow. sock: sock_set_timeout: `syz-executor3' (pid 6143) tries to set negative timeout sock: sock_set_timeout: `syz-executor3' (pid 6143) tries to set negative timeout netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. xt_l2tp: v2 sid > 0xffff: 4294967292 xt_l2tp: v2 sid > 0xffff: 4294967292 device syz2 entered promiscuous mode Protocol error: SET target dimension is over the limit! Protocol error: SET target dimension is over the limit! IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 netlink: 9 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=51329 sclass=netlink_route_socket pig=6638 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=51329 sclass=netlink_route_socket pig=6666 comm=syz-executor6 syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) netlink: 'syz-executor1': attribute type 8 has an invalid length. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 'syz-executor1': attribute type 8 has an invalid length. netlink: 'syz-executor7': attribute type 21 has an invalid length. sctp: [Deprecated]: syz-executor0 (pid 6784) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 6805) Use of int in max_burst socket option. Use struct sctp_assoc_value instead kauditd_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1517675072.419:34): avc: denied { read } for pid=6833 comm="syz-executor4" path="socket:[16654]" dev="sockfs" ino=16654 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 TCP: request_sock_TCP: Possible SYN flooding on port 20010. Sending cookies. Check SNMP counters. audit: type=1400 audit(1517675072.601:35): avc: denied { getopt } for pid=6902 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 syz-executor2 (6901) used greatest stack depth: 15072 bytes left audit: type=1400 audit(1517675072.718:36): avc: denied { accept } for pid=6948 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_netfilter_socket permissive=1 syz-executor6 (6951) used greatest stack depth: 14368 bytes left audit: type=1400 audit(1517675072.849:37): avc: denied { setopt } for pid=7001 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 audit: type=1400 audit(1517675073.104:38): avc: denied { bind } for pid=7103 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_netfilter_socket permissive=1 sock: sock_set_timeout: `syz-executor0' (pid 7193) tries to set negative timeout sock: sock_set_timeout: `syz-executor0' (pid 7193) tries to set negative timeout audit: type=1400 audit(1517675073.561:39): avc: denied { read } for pid=7296 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_netfilter_socket permissive=1 dccp_invalid_packet: pskb_may_pull failed nla_parse: 5 callbacks suppressed netlink: 3 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1400 audit(1517675074.601:40): avc: denied { connect } for pid=7714 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_netfilter_socket permissive=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. validate_nla: 4 callbacks suppressed netlink: 'syz-executor1': attribute type 21 has an invalid length. netlink: 'syz-executor1': attribute type 21 has an invalid length. audit: type=1400 audit(1517675074.890:41): avc: denied { map } for pid=7831 comm="syz-executor6" path="socket:[18224]" dev="sockfs" ino=18224 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dccp_socket permissive=1 sctp: [Deprecated]: syz-executor2 (pid 7839) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor2 (pid 7843) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead dccp_close: ABORT with 260 bytes unread sctp: [Deprecated]: syz-executor2 (pid 7910) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 7916) Use of int in max_burst socket option. Use struct sctp_assoc_value instead TCP: request_sock_TCPv6: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=8075 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=8072 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=8072 comm=syz-executor6 xt_hashlimit: Unknown mode mask 200, kernel too old? SELinux: unrecognized netlink message: protocol=6 nlmsg_type=41 sclass=netlink_xfrm_socket pig=8227 comm=syz-executor0 SNAT: multiple ranges no longer supported SNAT: multiple ranges no longer supported SELinux: unrecognized netlink message: protocol=4 nlmsg_type=17 sclass=netlink_tcpdiag_socket pig=8277 comm=syz-executor2 audit: type=1400 audit(1517675076.264:42): avc: denied { write } for pid=8270 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=17 sclass=netlink_tcpdiag_socket pig=8289 comm=syz-executor2 NFQUEUE: number of total queues is 0 IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE sctp: [Deprecated]: syz-executor6 (pid 8436) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 'syz-executor0': attribute type 21 has an invalid length. sctp: [Deprecated]: syz-executor6 (pid 8436) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 'syz-executor0': attribute type 21 has an invalid length. audit: type=1400 audit(1517675076.769:43): avc: denied { map } for pid=8472 comm="syz-executor3" path="socket:[19816]" dev="sockfs" ino=19816 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_route_socket permissive=1 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20014. Sending cookies. Check SNMP counters. 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-executor2': attribute type 21 has an invalid length. netlink: 'syz-executor2': attribute type 21 has an invalid length.