====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #219 Not tainted ------------------------------------------------------ syz-executor5/5068 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000d9f63c8e>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000d9f63c8e>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000003c2e178d>] 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 clusterip_config_init net/ipv4/netfilter/ipt_CLUSTERIP.c:261 [inline] clusterip_tg_check+0xeb9/0x1570 net/ipv4/netfilter/ipt_CLUSTERIP.c:478 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:513 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:554 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:725 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1675 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 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 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:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 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-executor5/5068: #0: (rtnl_mutex){+.+.}, at: [<000000003c2e178d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5068 Comm: syz-executor5 Not tainted 4.15.0+ #219 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_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 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:00007f3d80a3dc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000042 R08: 00000000201edffc R09: 0000000000000000 R10: 00000000209a2000 R11: 0000000000000212 R12: 00000000006ef6d0 R13: 00000000ffffffff R14: 00007f3d80a3e6d4 R15: 0000000000000000 device bridge0 entered promiscuous mode device bridge0 left promiscuous mode device bridge0 entered promiscuous mode device bridge0 left promiscuous mode netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'. audit: type=1400 audit(1517485433.450:16): avc: denied { create } for pid=5154 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_crypto_socket permissive=1 audit: type=1400 audit(1517485433.475:17): avc: denied { map } for pid=5158 comm="syz-executor3" path="socket:[13226]" dev="sockfs" ino=13226 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=socket permissive=1 audit: type=1400 audit(1517485433.918:18): avc: denied { map_create } for pid=5286 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(1517485433.920:19): avc: denied { prog_load } for pid=5286 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(1517485434.243:20): avc: denied { map } for pid=5325 comm="syz-executor2" path="socket:[13295]" dev="sockfs" ino=13295 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 netlink: 'syz-executor6': attribute type 16 has an invalid length. netlink: 'syz-executor6': attribute type 16 has an invalid length. dccp_invalid_packet: P.Data Offset(0) too small dccp_invalid_packet: P.Data Offset(0) too small audit: type=1400 audit(1517485434.701:21): avc: denied { create } for pid=5501 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_generic_socket permissive=1 syz-executor6 uses obsolete (PF_INET,SOCK_PACKET) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=55218 sclass=netlink_route_socket pig=5590 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=55218 sclass=netlink_route_socket pig=5598 comm=syz-executor6 sctp: [Deprecated]: syz-executor5 (pid 5714) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 5727) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead syz-executor1 (5835) used greatest stack depth: 14704 bytes left TCP: request_sock_TCPv6: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. device lo entered promiscuous mode PF_BRIDGE: br_mdb_parse() with invalid ifindex PF_BRIDGE: br_mdb_parse() with invalid ifindex openvswitch: netlink: Flow key attr not present in new flow. openvswitch: netlink: Flow key attr not present in new flow. sock: process `syz-executor4' is using obsolete getsockopt SO_BSDCOMPAT 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. sock: sock_set_timeout: `syz-executor4' (pid 6247) tries to set negative timeout sock: sock_set_timeout: `syz-executor4' (pid 6247) tries to set negative timeout dccp_xmit_packet: Payload too large (65423) for featneg. dccp_close: ABORT with 65423 bytes unread netlink: 'syz-executor4': attribute type 21 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 16 bytes leftover after parsing attributes in process `syz-executor2'. ip6t_REJECT: TCP_RESET illegal for non-tcp ip6t_REJECT: TCP_RESET illegal for non-tcp TCP: request_sock_TCPv6: Possible SYN flooding on port 20018. Sending cookies. Check SNMP counters. dccp_invalid_packet: P.type (REQUEST) not Data || [Data]Ack, while P.X == 0 dccp_invalid_packet: P.type (REQUEST) not Data || [Data]Ack, while P.X == 0 xt_DSCP: dscp fc out of range kauditd_printk_skb: 14 callbacks suppressed audit: type=1400 audit(1517485437.952:36): avc: denied { setopt } for pid=6793 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_crypto_socket permissive=1 audit: type=1400 audit(1517485438.002:37): avc: denied { connect } for pid=6788 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_netfilter_socket permissive=1 sctp: [Deprecated]: syz-executor3 (pid 6827) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 6827) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_l2tp: invalid flags combination: 8 xt_l2tp: invalid flags combination: 8 device syz2 entered promiscuous mode device syz2 left promiscuous mode netlink: 16 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1400 audit(1517485438.288:38): avc: denied { setopt } for pid=6894 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_netfilter_socket permissive=1 netlink: 'syz-executor5': attribute type 6 has an invalid length. netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. audit: type=1400 audit(1517485438.310:39): avc: denied { getopt } for pid=6894 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_netfilter_socket permissive=1 netlink: 'syz-executor5': attribute type 6 has an invalid length. netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. audit: type=1400 audit(1517485438.848:40): avc: denied { ioctl } for pid=7127 comm="syz-executor2" path="socket:[16626]" dev="sockfs" ino=16626 ioctlcmd=0x8953 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: 180 bytes leftover after parsing attributes in process `syz-executor2'. xt_l2tp: v2 doesn't support IP mode xt_l2tp: v2 doesn't support IP mode audit: type=1400 audit(1517485439.544:41): avc: denied { connect } for pid=7426 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_crypto_socket permissive=1 l2tp_core: tunl 6: fd 19 wrong protocol, got 1, expected 17 l2tp_core: tunl 6: fd 19 wrong protocol, got 1, expected 17 sctp: [Deprecated]: syz-executor1 (pid 7606) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead mip6: mip6_rthdr_init_state: state's mode is not 2: 0 mip6: mip6_rthdr_init_state: state's mode is not 2: 0 audit: type=1400 audit(1517485440.074:42): avc: denied { ioctl } for pid=7638 comm="syz-executor2" path="socket:[17619]" dev="sockfs" ino=17619 ioctlcmd=0xb100 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(1517485440.077:43): avc: denied { write } for pid=7638 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 sctp: [Deprecated]: syz-executor1 (pid 7656) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead device syz6 entered promiscuous mode device syz0 entered promiscuous mode Cannot find del_set index 3 as target Cannot find del_set index 3 as target SELinux: unrecognized netlink message: protocol=0 nlmsg_type=48564 sclass=netlink_route_socket pig=7869 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=48564 sclass=netlink_route_socket pig=7880 comm=syz-executor2 ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' audit: type=1400 audit(1517485440.858:44): avc: denied { create } for pid=7922 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_connector_socket permissive=1 ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' netlink: 'syz-executor3': attribute type 18 has an invalid length. netlink: 'syz-executor3': attribute type 18 has an invalid length. audit: type=1400 audit(1517485441.083:45): avc: denied { create } for pid=7998 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_fib_lookup_socket permissive=1 Cannot find del_set index 0 as target Cannot find del_set index 0 as target netlink: 'syz-executor6': attribute type 18 has an invalid length. netlink: 'syz-executor6': attribute type 18 has an invalid length. netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. xt_cgroup: invalid path, errno=-2 xt_cgroup: invalid path, errno=-2 IPVS: length: 24 != 8 IPVS: length: 24 != 8 sctp: [Deprecated]: syz-executor3 (pid 8545) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 8545) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 276 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 276 bytes leftover after parsing attributes in process `syz-executor7'. bridge0: port 1(syz2) entered blocking state bridge0: port 1(syz2) entered disabled state device syz2 entered promiscuous mode bridge0: port 1(syz2) entered blocking state bridge0: port 1(syz2) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready sctp: [Deprecated]: syz-executor5 (pid 8741) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 8757) Use of int in max_burst socket option. Use struct sctp_assoc_value instead raw_sendmsg: syz-executor1 forgot to set AF_INET. Fix it!