WARNING: possible circular locking dependency detected 4.15.0-rc9+ #214 Not tainted ------------------------------------------------------ syz-executor4/5070 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000002136d983>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000002136d983>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<0000000025fb3945>] 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 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3350 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/5070: #0: (rtnl_mutex){+.+.}, at: [<0000000025fb3945>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5070 Comm: syz-executor4 Not tainted 4.15.0-rc9+ #214 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 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3350 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:00007fef820e1c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000005d0 R08: 00000000201edffc R09: 0000000000000000 R10: 00000000209a2000 R11: 0000000000000212 R12: 00000000006f7c20 R13: 00000000ffffffff R14: 00007fef820e26d4 R15: 0000000000000000 IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route audit: type=1400 audit(1517211609.320:18): avc: denied { create } for pid=5084 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 audit: type=1400 audit(1517211609.321:19): avc: denied { accept } for pid=5084 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 audit: type=1400 audit(1517211609.324:20): avc: denied { write } for pid=5084 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 IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE audit: type=1400 audit(1517211609.373:21): avc: denied { prog_load } for pid=5098 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 netlink: 'syz-executor5': attribute type 6 has an invalid length. netlink: 'syz-executor5': attribute type 6 has an invalid length. can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. sctp: [Deprecated]: syz-executor3 (pid 5246) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 5246) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 'syz-executor2': attribute type 21 has an invalid length. netlink: 5 bytes leftover after parsing attributes in process `syz-executor3'. sctp: [Deprecated]: syz-executor5 (pid 5395) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 5409) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 5 bytes leftover after parsing attributes in process `syz-executor3'. syz-executor6 uses obsolete (PF_INET,SOCK_PACKET) mip6: mip6_destopt_init_state: spi is not 0: 3842244608 mip6: mip6_destopt_init_state: spi is not 0: 3842244608 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=2832 sclass=netlink_route_socket pig=5723 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=2832 sclass=netlink_route_socket pig=5723 comm=syz-executor5 TCP: request_sock_TCP: Possible SYN flooding on port 20025. Sending cookies. Check SNMP counters. netlink: 9 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 9 bytes leftover after parsing attributes in process `syz-executor5'. ipt_ECN: unsupported ECN operation ff netlink: 'syz-executor7': attribute type 1 has an invalid length. netlink: 'syz-executor7': attribute type 1 has an invalid length. TCP: request_sock_TCPv6: Possible SYN flooding on port 20030. Sending cookies. Check SNMP counters. netlink: 'syz-executor1': attribute type 21 has an invalid length. syz-executor0: vmalloc: allocation failure: 17179344896 bytes, mode:0x14080c0(GFP_KERNEL|__GFP_ZERO), nodemask=(null) syz-executor0 cpuset=/ mems_allowed=0 CPU: 0 PID: 6037 Comm: syz-executor0 Not tainted 4.15.0-rc9+ #214 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 warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3299 __vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags_caller+0x50/0x60 mm/vmalloc.c:1826 kvmalloc_node+0x82/0xd0 mm/util.c:406 kvmalloc include/linux/mm.h:541 [inline] kvmalloc_array include/linux/mm.h:557 [inline] xt_alloc_entry_offsets+0x21/0x30 net/netfilter/x_tables.c:774 translate_table+0x235/0x1690 net/ipv6/netfilter/ip6_tables.c:704 do_replace net/ipv6/netfilter/ip6_tables.c:1165 [inline] do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1691 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2896 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:00007f5ae40d2c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000013 RBP: 00000000000005ca R08: 0000000000000004 R09: 0000000000000000 R10: 0000000020001fde R11: 0000000000000212 R12: 00000000006f7b90 R13: 00000000ffffffff R14: 00007f5ae40d36d4 R15: 0000000000000000 Mem-Info: active_anon:46372 inactive_anon:63 isolated_anon:0 active_file:3468 inactive_file:8320 isolated_file:0 unevictable:0 dirty:195 writeback:0 unstable:0 slab_reclaimable:7001 slab_unreclaimable:92645 mapped:24108 shmem:70 pagetables:633 bounce:0 free:1442339 free_pcp:472 free_cma:0 Node 0 active_anon:187544kB inactive_anon:252kB active_file:13872kB inactive_file:33280kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96432kB dirty:780kB writeback:0kB shmem:280kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 73728kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 0 DMA free:15908kB min:164kB low:204kB high:244kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 2868 6378 6378 Node 0 DMA32 free:2939312kB min:30320kB low:37900kB high:45480kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129332kB managed:2940016kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:704kB local_pcp:44kB free_cma:0kB lowmem_reserve[]: 0 0 3510 3510 Node 0 Normal free:2814028kB min:37096kB low:46368kB high:55640kB active_anon:187544kB inactive_anon:252kB active_file:13872kB inactive_file:33280kB unevictable:0kB writepending:780kB present:4718592kB managed:3594332kB mlocked:0kB kernel_stack:3808kB pagetables:2532kB bounce:0kB free_pcp:1256kB local_pcp:548kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB Node 0 DMA32: 2*4kB (M) 3*8kB (M) 3*16kB (M) 1*32kB (M) 1*64kB (M) 2*128kB (M) 2*256kB (M) 3*512kB (M) 2*1024kB (M) 1*2048kB (M) 716*4096kB (M) = 2939312kB Node 0 Normal: 379*4kB (UM) 115*8kB (M) 1012*16kB (UME) 474*32kB (UME) 69*64kB (UME) 23*128kB (UME) 4*256kB (ME) 6*512kB (UME) 4*1024kB (ME) 2*2048kB (UM) 674*4096kB (M) = 2814148kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 11857 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965979 pages RAM 0 pages HighMem/MovableOnly 328415 pages reserved netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. kauditd_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1517211613.000:34): avc: denied { setopt } for pid=6076 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_crypto_socket permissive=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=64497 sclass=netlink_route_socket pig=6137 comm=syz-executor0 netlink: 188 bytes leftover after parsing attributes in process `syz-executor0'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=64497 sclass=netlink_route_socket pig=6137 comm=syz-executor0 netlink: 188 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 7 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 7 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1400 audit(1517211613.379:35): avc: denied { map } for pid=6203 comm="syz-executor7" path="socket:[14957]" dev="sockfs" ino=14957 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 audit: type=1400 audit(1517211613.449:36): avc: denied { name_connect } for pid=6227 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 sock: process `syz-executor7' is using obsolete getsockopt SO_BSDCOMPAT audit: type=1400 audit(1517211613.660:37): avc: denied { ioctl } for pid=6304 comm="syz-executor5" path="socket:[15789]" dev="sockfs" ino=15789 ioctlcmd=0x891c 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(1517211613.660:38): avc: denied { name_bind } for pid=6294 comm="syz-executor4" src=20016 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517211613.660:39): avc: denied { node_bind } for pid=6294 comm="syz-executor4" src=20016 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. netlink: 156 bytes leftover after parsing attributes in process `syz-executor0'. audit: type=1400 audit(1517211614.077:40): avc: denied { getopt } for pid=6430 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 netlink: 156 bytes leftover after parsing attributes in process `syz-executor0'. audit: type=1400 audit(1517211614.513:41): avc: denied { net_bind_service } for pid=6629 comm="syz-executor1" capability=10 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 audit: type=1400 audit(1517211614.514:42): avc: denied { map } for pid=6627 comm="syz-executor2" path="socket:[15248]" dev="sockfs" ino=15248 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 audit: type=1400 audit(1517211614.639:43): avc: denied { ioctl } for pid=6684 comm="syz-executor7" path="socket:[16070]" dev="sockfs" ino=16070 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_crypto_socket permissive=1 validate_nla: 1 callbacks suppressed netlink: 'syz-executor6': attribute type 21 has an invalid length. netlink: 'syz-executor6': attribute type 6 has an invalid length. xt_hashlimit: overflow, rate too high: 0 xt_hashlimit: overflow, rate too high: 0 netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 2 bytes leftover after parsing attributes in process `syz-executor1'. sctp: [Deprecated]: syz-executor0 (pid 6887) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 2 bytes leftover after parsing attributes in process `syz-executor1'. sctp: [Deprecated]: syz-executor0 (pid 6918) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. mip6: mip6_destopt_init_state: spi is not 0: 3775135744 netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor7': attribute type 1 has an invalid length. netlink: 'syz-executor7': attribute type 1 has an invalid length. device syz0 entered promiscuous mode netlink: 'syz-executor3': attribute type 21 has an invalid length. device syz0 left promiscuous mode xt_HMARK: spi-mask and port-mask can't be combined xt_HMARK: spi-mask and port-mask can't be combined SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35412 sclass=netlink_route_socket pig=7366 comm=syz-executor1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35412 sclass=netlink_route_socket pig=7381 comm=syz-executor1 raw_sendmsg: syz-executor0 forgot to set AF_INET. Fix it! SELinux: unrecognized netlink message: protocol=0 nlmsg_type=42921 sclass=netlink_route_socket pig=7674 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=42921 sclass=netlink_route_socket pig=7674 comm=syz-executor5 TCP: request_sock_TCPv6: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=4 nlmsg_type=94 sclass=netlink_tcpdiag_socket pig=7994 comm=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=4 nlmsg_type=94 sclass=netlink_tcpdiag_socket pig=7994 comm=syz-executor1 netlink: 'syz-executor6': attribute type 21 has an invalid length. can: request_module (can-proto-5) failed. netlink: 'syz-executor6': attribute type 21 has an invalid length. can: request_module (can-proto-5) failed. kauditd_printk_skb: 2 callbacks suppressed audit: type=1400 audit(1517211618.461:46): avc: denied { connect } for pid=8107 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 xt_HL: TTL: invalid or unknown mode 100 tc_dump_action: action bad kind RDS: rds_bind could not find a transport for 224.0.0.2, load rds_tcp or rds_rdma? tc_dump_action: action bad kind nla_parse: 6 callbacks suppressed netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. audit: type=1400 audit(1517211619.259:47): avc: denied { getattr } for pid=8382 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 netlink: 24 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor0'.