WARNING: possible circular locking dependency detected 4.15.0-rc9+ #213 Not tainted ------------------------------------------------------ syz-executor0/4926 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000c176ea9e>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000c176ea9e>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000da4bbd03>] 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: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-executor0/4926: #0: (rtnl_mutex){+.+.}, at: [<00000000da4bbd03>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 4926 Comm: syz-executor0 Not tainted 4.15.0-rc9+ #213 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:00007fafa6887c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000005d1 R08: 0000000020037000 R09: 0000000000000000 R10: 0000000020008000 R11: 0000000000000212 R12: 00000000006f7c38 R13: 00000000ffffffff R14: 00007fafa68886d4 R15: 0000000000000000 dccp_invalid_packet: P.Data Offset(66) too large netlink: 5 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor6'. PF_BRIDGE: br_mdb_parse() with unknown ifindex PF_BRIDGE: br_mdb_parse() with unknown ifindex IPVS: length: 24 != 8 netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. openvswitch: netlink: ufid size 20 bytes exceeds the range (1, 16) openvswitch: netlink: Flow get message rejected, Key attribute missing. openvswitch: netlink: ufid size 20 bytes exceeds the range (1, 16) openvswitch: netlink: Flow get message rejected, Key attribute missing. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=4265 sclass=netlink_route_socket pig=5241 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=4265 sclass=netlink_route_socket pig=5241 comm=syz-executor5 syz0: Invalid MTU 6 requested, hw min 68 syz0: Invalid MTU 6 requested, hw min 68 xt_SECMARK: invalid mode: 0 audit: type=1400 audit(1517156255.233:21): avc: denied { name_connect } for pid=4935 comm="syz-executor7" dest=20028 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 raw_sendmsg: syz-executor0 forgot to set AF_INET. Fix it! TCP: request_sock_TCPv6: Possible SYN flooding on port 20018. Sending cookies. Check SNMP counters. x_tables: ip_tables: ipcomp match: only valid for protocol 108 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. ipt_CLUSTERIP: Please specify an interface name ipt_CLUSTERIP: Please specify an interface name netlink: 'syz-executor1': attribute type 21 has an invalid length. netlink: 'syz-executor1': attribute type 21 has an invalid length. sctp: [Deprecated]: syz-executor6 (pid 5951) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor6 (pid 5956) Use of int in maxseg socket option. Use struct sctp_assoc_value instead FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 6011 Comm: syz-executor0 Not tainted 4.15.0-rc9+ #213 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc_node mm/slab.c:3289 [inline] kmem_cache_alloc_node+0x56/0x760 mm/slab.c:3632 __alloc_skb+0xf1/0x780 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:983 [inline] sock_wmalloc+0x140/0x1d0 net/core/sock.c:1940 __ip_append_data.isra.45+0x1aee/0x2580 net/ipv4/ip_output.c:976 ip_append_data.part.46+0xde/0x150 net/ipv4/ip_output.c:1170 ip_append_data+0x5a/0x80 net/ipv4/ip_output.c:1159 raw_sendmsg+0x181c/0x26b0 net/ipv4/raw.c:678 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1747 SyS_sendto+0x40/0x50 net/socket.c:1715 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fafa6887c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fafa6887aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020952000 RDI: 0000000000000013 RBP: 00007fafa6887a90 R08: 0000000020af3000 R09: 0000000000000010 R10: 0000000000008800 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fafa6887bc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 6026 Comm: syz-executor0 Not tainted 4.15.0-rc9+ #213 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc_node mm/slab.c:3289 [inline] kmem_cache_alloc_node_trace+0x5a/0x750 mm/slab.c:3651 __do_kmalloc_node mm/slab.c:3671 [inline] __kmalloc_node_track_caller+0x33/0x70 mm/slab.c:3686 __kmalloc_reserve.isra.39+0x41/0xd0 net/core/skbuff.c:137 __alloc_skb+0x13b/0x780 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:983 [inline] sock_wmalloc+0x140/0x1d0 net/core/sock.c:1940 __ip_append_data.isra.45+0x1aee/0x2580 net/ipv4/ip_output.c:976 ip_append_data.part.46+0xde/0x150 net/ipv4/ip_output.c:1170 ip_append_data+0x5a/0x80 net/ipv4/ip_output.c:1159 raw_sendmsg+0x181c/0x26b0 net/ipv4/raw.c:678 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1747 SyS_sendto+0x40/0x50 net/socket.c:1715 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fafa6887c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fafa6887aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020952000 RDI: 0000000000000013 RBP: 00007fafa6887a90 R08: 0000000020af3000 R09: 0000000000000010 R10: 0000000000008800 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fafa6887bc8 R14: 00000000004b8096 R15: 0000000000000000 ip6t_REJECT: TCP_RESET illegal for non-tcp ip6t_REJECT: TCP_RESET illegal for non-tcp kauditd_printk_skb: 17 callbacks suppressed audit: type=1400 audit(1517156259.271:39): avc: denied { ioctl } for pid=6103 comm="syz-executor5" path="socket:[14979]" dev="sockfs" ino=14979 ioctlcmd=0x5462 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(1517156259.545:40): avc: denied { setopt } for pid=6232 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 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=270 sclass=netlink_route_socket pig=6261 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=270 sclass=netlink_route_socket pig=6276 comm=syz-executor7 Cannot find add_set index 0 as target nla_parse: 4 callbacks suppressed netlink: 40 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor6'. audit: type=1400 audit(1517156260.045:41): avc: denied { write } for pid=6407 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 audit: type=1400 audit(1517156260.070:42): avc: denied { ioctl } for pid=6407 comm="syz-executor2" path="socket:[15224]" dev="sockfs" ino=15224 ioctlcmd=0x89e2 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 Cannot find add_set index 0 as target Cannot find add_set index 0 as target audit: type=1400 audit(1517156260.267:43): avc: denied { create } for pid=6475 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_scsitransport_socket permissive=1 sctp: [Deprecated]: syz-executor4 (pid 6580) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor4 (pid 6580) Use of int in maxseg socket option. Use struct sctp_assoc_value instead audit: type=1400 audit(1517156260.625:44): avc: denied { create } for pid=6614 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_iscsi_socket permissive=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20010. Sending cookies. Check SNMP counters. xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables 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(1517156261.196:45): avc: denied { accept } for pid=6827 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 audit: type=1400 audit(1517156261.222:46): avc: denied { getopt } for pid=6827 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: 8 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=53773 sclass=netlink_route_socket pig=6888 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=53773 sclass=netlink_route_socket pig=6888 comm=syz-executor2 netlink: 'syz-executor6': attribute type 19 has an invalid length. netlink: 28 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 'syz-executor6': attribute type 19 has an invalid length. netlink: 28 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. audit: type=1400 audit(1517156261.808:47): avc: denied { map } for pid=7050 comm="syz-executor2" path="socket:[16732]" dev="sockfs" ino=16732 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_xfrm_socket permissive=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. sctp: [Deprecated]: syz-executor7 (pid 7078) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor7 (pid 7096) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 11 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor4'. FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 7296 Comm: syz-executor1 Not tainted 4.15.0-rc9+ #213 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2948 [inline] prepare_alloc_pages mm/page_alloc.c:4187 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4226 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036 alloc_pages include/linux/gfp.h:492 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2211 tun_build_skb.isra.51+0x2f0/0x1810 drivers/net/tun.c:1630 tun_get_user+0x17d0/0x3940 drivers/net/tun.c:1800 tun_chr_write_iter+0xb9/0x160 drivers/net/tun.c:1986 call_write_iter include/linux/fs.h:1772 [inline] do_iter_readv_writev+0x525/0x7f0 fs/read_write.c:653 do_iter_write+0x154/0x540 fs/read_write.c:932 vfs_writev+0x18a/0x340 fs/read_write.c:977 do_writev+0xfc/0x2a0 fs/read_write.c:1012 SYSC_writev fs/read_write.c:1085 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1082 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453171 RSP: 002b:00007f17ee272b80 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f17ee272aa0 RCX: 0000000000453171 RDX: 0000000000000001 RSI: 00007f17ee272bd0 RDI: 0000000000000012 RBP: 00007f17ee272a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000072 R11: 0000000000000293 R12: 00000000004b8096 R13: 00007f17ee272bc8 R14: 00000000004b8096 R15: 0000000000000000 8021q: VLANs not supported on lo 8021q: VLANs not supported on lo netlink: 'syz-executor4': attribute type 21 has an invalid length. netlink: 'syz-executor4': attribute type 6 has an invalid length. netlink: 'syz-executor4': attribute type 21 has an invalid length. netlink: 'syz-executor4': attribute type 6 has an invalid length. audit: type=1400 audit(1517156263.776:48): avc: denied { setopt } for pid=7593 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 device syz6 entered promiscuous mode device syz6 left promiscuous mode kauditd_printk_skb: 3 callbacks suppressed audit: type=1400 audit(1517156264.583:52): avc: denied { map } for pid=7917 comm="syz-executor3" path="pipe:[17325]" dev="pipefs" ino=17325 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 IPv6: NLM_F_REPLACE set, but no existing node found! netlink: 'syz-executor2': attribute type 11 has an invalid length. netlink: 'syz-executor2': attribute type 11 has an invalid length.