WARNING: possible circular locking dependency detected 4.15.0-rc9+ #217 Not tainted ------------------------------------------------------ syz-executor4/5505 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000f4083902>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000f4083902>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<0000000083e8208d>] 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/ipv4/netfilter/ip_tables.c:518 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:559 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:730 do_replace net/ipv4/netfilter/ip_tables.c:1146 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1680 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1260 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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_INET){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1463 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2473 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2937 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 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_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor4/5505: #0: (rtnl_mutex){+.+.}, at: [<0000000083e8208d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5505 Comm: syz-executor4 Not tainted 4.15.0-rc9+ #217 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.37+0x2cd/0x2dc kernel/locking/lockdep.c:1218 check_prev_add kernel/locking/lockdep.c:1858 [inline] check_prevs_add kernel/locking/lockdep.c:1971 [inline] validate_chain kernel/locking/lockdep.c:2412 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3426 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1463 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2473 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2937 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f2609358c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007f2609359700 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000000 R08: 0000000020004000 R09: 0000000000000000 R10: 0000000020008000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007f26093599c0 R15: 0000000000000000 netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. sctp: [Deprecated]: syz-executor0 (pid 5604) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor0 (pid 5611) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. sctp: [Deprecated]: syz-executor1 (pid 5657) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor1 (pid 5657) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 syz-executor0 (5710) used greatest stack depth: 15456 bytes left ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 syz-executor4 uses obsolete (PF_INET,SOCK_PACKET) sctp: [Deprecated]: syz-executor4 (pid 5992) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_nfacct: accounting object with name `syz1' does not exists sctp: [Deprecated]: syz-executor4 (pid 5992) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_nfacct: accounting object with name `syz1' does not exists sctp: [Deprecated]: syz-executor2 (pid 6035) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 6062) Use of int in max_burst socket option. Use struct sctp_assoc_value instead IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found dccp_close: ABORT with 8232 bytes unread xt_limit: Overflow, try lower: 0/0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. dccp_xmit_packet: Payload too large (65423) for featneg. dccp_xmit_packet: Payload too large (65423) for featneg. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 4 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 4 bytes leftover after parsing attributes in process `syz-executor7'. atomic_op 00000000db21fbca conn xmit_atomic (null) kauditd_printk_skb: 15 callbacks suppressed audit: type=1400 audit(1517334253.586:37): avc: denied { read } for pid=6671 comm="syz-executor4" path="socket:[16608]" dev="sockfs" ino=16608 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 atomic_op 0000000069672a16 conn xmit_atomic (null) xt_CT: You must specify a L4 protocol, and not use inversions on it. audit: type=1400 audit(1517334253.655:38): avc: denied { accept } for pid=6671 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_generic_socket permissive=1 openvswitch: netlink: Flow key attr not present in new flow. openvswitch: netlink: Flow key attr not present in new flow. netlink: 'syz-executor6': attribute type 6 has an invalid length. netlink: 'syz-executor6': attribute type 6 has an invalid length. dccp_close: ABORT with 2 bytes unread audit: type=1400 audit(1517334254.236:39): avc: denied { setopt } for pid=6891 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 ipt_REJECT: TCP_RESET invalid for non-tcp audit: type=1400 audit(1517334254.237:40): avc: denied { net_broadcast } for pid=6891 comm="syz-executor0" capability=11 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 ipt_REJECT: TCP_RESET invalid for non-tcp audit: type=1400 audit(1517334254.432:41): avc: denied { bind } for pid=6944 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_generic_socket permissive=1 netlink: 'syz-executor5': attribute type 1 has an invalid length. netlink: 'syz-executor5': attribute type 1 has an invalid length. audit: type=1400 audit(1517334254.707:42): avc: denied { setopt } for pid=7063 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 TCP: request_sock_TCPv6: Possible SYN flooding on port 20030. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=19076 sclass=netlink_route_socket pig=7194 comm=syz-executor3 netlink: 'syz-executor5': attribute type 16 has an invalid length. netlink: 'syz-executor5': attribute type 16 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=19076 sclass=netlink_route_socket pig=7219 comm=syz-executor3 netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1400 audit(1517334255.503:43): avc: denied { ioctl } for pid=7388 comm="syz-executor4" path="socket:[17505]" dev="sockfs" ino=17505 ioctlcmd=0x8980 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 xt_TPROXY: Can be used only in combination with either -p tcp or -p udp netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' audit: type=1400 audit(1517334255.545:44): avc: denied { relabelto } for pid=7409 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:policy_src_t:s0 tclass=packet permissive=1 netlink: 'syz-executor1': attribute type 1 has an invalid length. audit: type=1400 audit(1517334256.124:45): avc: denied { setopt } for pid=7606 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 IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found TCP: request_sock_TCPv6: Possible SYN flooding on port 20014. Sending cookies. Check SNMP counters. Bearer <> rejected, not supported in standalone mode openvswitch: netlink: Message has 4 unknown bytes. openvswitch: netlink: Message has 4 unknown bytes. xt_HL: TTL: invalid or unknown mode 100 xt_HL: TTL: invalid or unknown mode 100 audit: type=1400 audit(1517334257.040:46): avc: denied { create } for pid=7894 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_scsitransport_socket permissive=1 netlink: 'syz-executor0': attribute type 21 has an invalid length. netlink: 'syz-executor0': attribute type 21 has an invalid length. RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? xt_SECMARK: invalid security context 'system_u:object_r:systemd_unit_file_t:s0:¯' xt_SECMARK: invalid security context 'system_u:object_r:systemd_unit_file_t:s0:¯' Cannot find set identified by id 0 to match Cannot find set identified by id 0 to match openvswitch: netlink: Message has 4 unknown bytes. openvswitch: netlink: Message has 4 unknown bytes. netlink: 'syz-executor7': attribute type 21 has an invalid length. netlink: 'syz-executor7': attribute type 21 has an invalid length. audit: type=1400 audit(1517334258.698:47): avc: denied { create } for pid=8323 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_iscsi_socket permissive=1 netlink: 'syz-executor3': attribute type 18 has an invalid length. netlink: 'syz-executor3': attribute type 18 has an invalid length. audit: type=1400 audit(1517334259.010:48): avc: denied { getopt } for pid=8432 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_crypto_socket permissive=1 A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. sctp: [Deprecated]: syz-executor2 (pid 8745) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor2 (pid 8733) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead