====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #314 Not tainted ------------------------------------------------------ capability: warning: `syz-executor0' uses 32-bit capabilities (legacy support in use) syz-executor3/5472 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000002a47b02d>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000002a47b02d>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000005e400739>] 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: -> #2 (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 unregister_netdevice_notifier+0x91/0x4e0 net/core/dev.c:1673 tee_tg_destroy+0x61/0xc0 net/netfilter/xt_TEE.c:123 cleanup_entry+0x218/0x350 net/ipv4/netfilter/ip_tables.c:654 __do_replace+0x79d/0xa50 net/ipv4/netfilter/ip_tables.c:1089 do_replace net/ipv4/netfilter/ip_tables.c:1145 [inline] do_ipt_set_ctl+0x40f/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+0x97/0xa0 net/ipv4/ip_sockglue.c:1259 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&xt[i].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 xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 xt_request_find_table_lock+0x28/0xc0 net/netfilter/x_tables.c:1093 get_info+0x154/0x690 net/ipv6/netfilter/ip6_tables.c:989 do_arpt_get_ctl+0x2a9/0xa00 net/ipv4/netfilter/arp_tables.c:1481 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt+0x15c/0x220 net/ipv4/ip_sockglue.c:1571 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2934 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (sk_lock-AF_INET){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: sk_lock-AF_INET --> &xt[i].mutex --> rtnl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&xt[i].mutex); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor3/5472: #0: (rtnl_mutex){+.+.}, at: [<000000005e400739>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5472 Comm: syz-executor3 Not tainted 4.16.0-rc1+ #314 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:2777 lock_sock include/net/sock.h:1463 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007f735a811c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f735a8126d4 RCX: 0000000000453a59 RDX: 000000000000002a RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000090 R09: 0000000000000000 R10: 0000000020139f70 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000518 R14: 00000000006f7ae0 R15: 0000000000000000 audit: type=1400 audit(1518797666.851:31): avc: denied { prog_load } for pid=5529 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 device eql entered promiscuous mode audit: type=1400 audit(1518797667.308:32): avc: denied { create } for pid=5660 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 audit: type=1400 audit(1518797667.545:33): avc: denied { create } for pid=5709 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_generic_socket permissive=1 device eql entered promiscuous mode device eql entered promiscuous mode device syz5 entered promiscuous mode insert transport fail, errno -17 device syz5 left promiscuous mode syz-executor5 (5913) used greatest stack depth: 14848 bytes left netlink: 'syz-executor3': attribute type 46 has an invalid length. netlink: 'syz-executor3': attribute type 46 has an invalid length. netlink: 'syz-executor3': attribute type 46 has an invalid length. netlink: 'syz-executor3': attribute type 46 has an invalid length. syz-executor6: vmalloc: allocation failure: 0 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) syz-executor6 cpuset=/ mems_allowed=0 CPU: 0 PID: 5970 Comm: syz-executor6 Not tainted 4.16.0-rc1+ #314 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 QAT: Invalid ioctl warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3306 QAT: Invalid ioctl QAT: Invalid ioctl __vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x45/0x50 mm/vmalloc.c:1840 sel_write_load+0x1f5/0x1910 security/selinux/selinuxfs.c:495 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_pwrite64 fs/read_write.c:631 [inline] SyS_pwrite64+0x15b/0x190 fs/read_write.c:618 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007ff1aa906c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007ff1aa9076d4 RCX: 0000000000453a59 RDX: 0000000000000000 RSI: 0000000020ca2000 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000045e R14: 00000000006f6970 R15: 0000000000000000 Mem-Info: active_anon:92184 inactive_anon:63 isolated_anon:0 active_file:3497 inactive_file:8360 isolated_file:0 unevictable:0 dirty:64 writeback:0 unstable:0 slab_reclaimable:7034 slab_unreclaimable:92481 mapped:24162 shmem:70 pagetables:744 bounce:0 free:1400268 free_pcp:478 free_cma:0 QAT: Invalid ioctl Node 0 active_anon:370860kB inactive_anon:252kB active_file:13988kB inactive_file:33440kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96648kB dirty:256kB writeback:0kB shmem:280kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 149504kB 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:2939112kB min:30316kB low:37892kB high:45468kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129292kB managed:2939944kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:832kB local_pcp:176kB free_cma:0kB lowmem_reserve[]: 0 0 3510 3510 Node 0 Normal free:2651972kB min:37100kB low:46372kB high:55644kB active_anon:360624kB inactive_anon:252kB active_file:13988kB inactive_file:33440kB unevictable:0kB writepending:256kB present:4718592kB managed:3594328kB mlocked:0kB kernel_stack:4352kB pagetables:2976kB bounce:0kB free_pcp:936kB local_pcp:456kB 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: 4*4kB (M) 3*8kB (UM) 4*16kB (UM) 4*32kB (M) 4*64kB (UM) 2*128kB (M) 2*256kB (UM) 4*512kB (UM) 3*1024kB (UM) 2*2048kB (UM) 715*4096kB (M) = 2939112kB Node 0 Normal: 472*4kB (UME) 1730*8kB (UE) 1684*16kB (UE) 310*32kB (UE) 47*64kB (UME) 20*128kB (ME) 11*256kB (UME) 4*512kB (ME) 4*1024kB (UM) 1*2048kB (E) 628*4096kB (M) = 2641456kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 11926 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965969 pages RAM 0 pages HighMem/MovableOnly 328424 pages reserved syz-executor6: vmalloc: allocation failure: 0 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) syz-executor6 cpuset=/ mems_allowed=0 CPU: 1 PID: 5984 Comm: syz-executor6 Not tainted 4.16.0-rc1+ #314 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:3306 __vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x45/0x50 mm/vmalloc.c:1840 sel_write_load+0x1f5/0x1910 security/selinux/selinuxfs.c:495 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_pwrite64 fs/read_write.c:631 [inline] SyS_pwrite64+0x15b/0x190 fs/read_write.c:618 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007ff1aa8c4c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007ff1aa8c56d4 RCX: 0000000000453a59 RDX: 0000000000000000 RSI: 0000000020ca2000 RDI: 0000000000000014 RBP: 000000000071c010 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000045e R14: 00000000006f6970 R15: 0000000000000002 QAT: Invalid ioctl netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl binder_alloc: binder_alloc_mmap_handler: 6122 20000000-20002000 already mapped failed -16 QAT: Invalid ioctl binder: BINDER_SET_CONTEXT_MGR already set binder: 6128 RLIMIT_NICE not set binder: 6122:6124 ioctl 40046207 0 returned -16 binder_alloc: 6122: binder_alloc_buf, no vma binder: 6122:6128 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 ptrace attach of "/root/syz-executor7"[4214] was attempted by "/root/syz-executor7"[6137] ptrace attach of "/root/syz-executor7"[4214] was attempted by "/root/syz-executor7"[6155] device eql entered promiscuous mode kauditd_printk_skb: 7 callbacks suppressed audit: type=1400 audit(1518797670.499:41): avc: denied { map } for pid=6181 comm="syz-executor5" path="socket:[16359]" dev="sockfs" ino=16359 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 netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. openvswitch: netlink: Message has 8 unknown bytes. openvswitch: netlink: Message has 8 unknown bytes. device eql entered promiscuous mode binder: 6316:6322 unknown command 0 binder: 6316:6322 ioctl c0306201 20bcdfd0 returned -22 binder: 6316:6322 unknown command 0 binder: 6316:6322 ioctl c0306201 20bcdfd0 returned -22 x86/PAT: syz-executor4:6381 map pfn RAM range req write-combining for [mem 0x1b5df0000-0x1b5df3fff], got write-back x86/PAT: syz-executor4:6381 map pfn RAM range req write-combining for [mem 0x1b5fd0000-0x1b5fd3fff], got write-back QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl device eql entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl SELinux: Invalid class 85 nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. audit: type=1400 audit(1518797672.121:42): avc: denied { prog_run } for pid=6638 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=bpf permissive=1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=50130 sclass=netlink_route_socket pig=6743 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=50130 sclass=netlink_route_socket pig=6751 comm=syz-executor4 audit: type=1400 audit(1518797672.524:43): avc: denied { ipc_lock } for pid=6785 comm="syz-executor6" capability=14 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=1326 audit(1518797672.579:44): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x7ffc0000 audit: type=1326 audit(1518797672.580:45): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x7ffc0000 audit: type=1326 audit(1518797672.593:46): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=118 compat=0 ip=0x453a59 code=0x7ffc0000 audit: type=1326 audit(1518797672.594:47): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x7ffc0000 audit: type=1326 audit(1518797672.594:48): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x7ffc0000 audit: type=1326 audit(1518797672.601:49): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6784 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=94 compat=0 ip=0x453a59 code=0x7ffc0000 SELinux: policydb string length 1703706342 does not match expected length 8 SELinux: failed to load policy SELinux: policydb string length 1703706342 does not match expected length 8 SELinux: failed to load policy netlink: 4 bytes leftover after parsing attributes in process `syz-executor7'. IPv6: NLM_F_REPLACE set, but no existing node found! netlink: 4 bytes leftover after parsing attributes in process `syz-executor7'. IPv6: NLM_F_REPLACE set, but no existing node found! binder: 6914:6918 BC_CLEAR_DEATH_NOTIFICATION death notification cookie mismatch 6e69622f7665642f != 0000000000000000 binder: 6918 RLIMIT_NICE not set binder: 6914:6918 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 6914:6931 BC_CLEAR_DEATH_NOTIFICATION death notification cookie mismatch 6e69622f7665642f != 0000000000000000 binder: 6931 RLIMIT_NICE not set binder: 6914:6918 BC_DEAD_BINDER_DONE 0000000000000000 not found QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl mmap: syz-executor4 (7024) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. QAT: Invalid ioctl QAT: failed to copy from user cfg_data. QAT: Invalid ioctl QAT: failed to copy from user cfg_data. QAT: Invalid ioctl binder: 7067:7069 not enough space to store 0 fds in buffer binder: 7067:7069 transaction failed 29201/-22, size 72-16 line 3099 binder_alloc: binder_alloc_mmap_handler: 7067 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 7067:7069 ioctl 40046207 0 returned -16 binder_alloc: 7067: binder_alloc_buf, no vma binder: 7067:7079 transaction failed 29189/-3, size 72-16 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 netlink: 'syz-executor1': attribute type 21 has an invalid length. netlink: 'syz-executor1': attribute type 21 has an invalid length. xt_connbytes: Forcing CT accounting to be enabled