binder: 5525:5537 ioctl c0306201 20006fd0 returned -14 ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor0/5539 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<00000000bc18959a>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<00000000bc18959a>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000c345595b>] 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 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 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 -> #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_ip6t_get_ctl+0x159/0xaf0 net/ipv6/netfilter/ip6_tables.c:1710 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1df/0x2e0 net/ipv6/ipv6_sockglue.c:1371 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_INET6){+.+.}: 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_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 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_INET6 --> &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_INET6); *** DEADLOCK *** 1 lock held by syz-executor0/5539: #0: (rtnl_mutex){+.+.}, at: [<00000000c345595b>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5539 Comm: syz-executor0 Not tainted 4.16.0-rc1+ #315 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_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 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:00007f26d68a1c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f26d68a26d4 RCX: 0000000000453a59 RDX: 0000000000000014 RSI: 0000000000000029 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000000000014 R09: 0000000000000000 R10: 00000000202eafec R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000509 R14: 00000000006f7978 R15: 0000000000000000 capability: warning: `syz-executor6' uses 32-bit capabilities (legacy support in use) device eql entered promiscuous mode audit: type=1400 audit(1518809907.611:28): avc: denied { write } for pid=5722 comm="syz-executor5" path="socket:[16390]" dev="sockfs" ino=16390 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 ALSA: seq fatal error: cannot create timer (-22) ALSA: seq fatal error: cannot create timer (-22) NFQUEUE: number of total queues is 0 audit: type=1400 audit(1518809907.745:29): avc: denied { ipc_owner } for pid=5752 comm="syz-executor4" capability=15 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 NFQUEUE: number of total queues is 0 audit: type=1400 audit(1518809907.783:30): avc: denied { create } for pid=5778 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_generic_socket permissive=1 rfkill: input handler disabled rfkill: input handler enabled SELinux: unknown mount option syz-executor7: vmalloc: allocation failure, allocated 2681085952 of 4294971392 bytes, mode:0x14010c0(GFP_KERNEL|__GFP_NORETRY), nodemask=(null) syz-executor7: vmalloc: allocation failure, allocated 2991181824 of 4294971392 bytes, mode:0x14010c0(GFP_KERNEL|__GFP_NORETRY), nodemask=(null) syz-executor7 cpuset= syz-executor7 cpuset= / mems_allowed=0 / CPU: 0 PID: 6041 Comm: syz-executor7 Not tainted 4.16.0-rc1+ #315 mems_allowed=0 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_area_node mm/vmalloc.c:1718 [inline] __vmalloc_node_range+0x482/0x650 mm/vmalloc.c:1759 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags_caller+0x50/0x60 mm/vmalloc.c:1826 kvmalloc_node+0x82/0xd0 mm/util.c:428 kvmalloc include/linux/mm.h:541 [inline] xt_alloc_table_info+0x63/0xe0 net/netfilter/x_tables.c:1016 do_replace net/ipv4/netfilter/arp_tables.c:970 [inline] do_arpt_set_ctl+0x29d/0x8d0 net/ipv4/netfilter/arp_tables.c:1458 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 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:00007f22bf2bec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f22bf2bf6d4 RCX: 0000000000453a59 RDX: 0000000000000060 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000071c010 R08: 0000000000000751 R09: 0000000000000000 R10: 00000000200cd000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004d3 R14: 00000000006f7468 R15: 0000000000000002 CPU: 1 PID: 6032 Comm: syz-executor7 Not tainted 4.16.0-rc1+ #315 Mem-Info: 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 active_anon:82461 inactive_anon:63 isolated_anon:0 active_file:4722 inactive_file:5260 isolated_file:0 unevictable:0 dirty:176 writeback:0 unstable:0 slab_reclaimable:7108 slab_unreclaimable:92108 mapped:24147 shmem:70 pagetables:683 bounce:0 free:24330 free_pcp:30 free_cma:0 warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3306 Node 0 active_anon:329844kB inactive_anon:252kB active_file:18888kB inactive_file:21040kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96588kB dirty:704kB writeback:0kB shmem:280kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 139264kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 0 __vmalloc_area_node mm/vmalloc.c:1718 [inline] __vmalloc_node_range+0x482/0x650 mm/vmalloc.c:1759 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 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags_caller+0x50/0x60 mm/vmalloc.c:1826 lowmem_reserve[]: kvmalloc_node+0x82/0xd0 mm/util.c:428 0 kvmalloc include/linux/mm.h:541 [inline] xt_alloc_table_info+0x63/0xe0 net/netfilter/x_tables.c:1016 do_replace net/ipv4/netfilter/arp_tables.c:970 [inline] do_arpt_set_ctl+0x29d/0x8d0 net/ipv4/netfilter/arp_tables.c:1458 2868 6378 6378 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 Node 0 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 DMA32 free:44340kB 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:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 0 3510 3510 Node 0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 Normal free:37072kB min:37100kB low:46372kB high:55644kB active_anon:329844kB inactive_anon:252kB active_file:18524kB inactive_file:21260kB unevictable:0kB writepending:704kB present:4718592kB managed:3594328kB mlocked:0kB kernel_stack:3776kB pagetables:2732kB bounce:0kB free_pcp:120kB local_pcp:0kB free_cma:0kB RSP: 002b:00007f22bf300c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f22bf3016d4 RCX: 0000000000453a59 RDX: 0000000000000060 RSI: 0000000000000000 RDI: 0000000000000013 lowmem_reserve[]: RBP: 000000000071bea0 R08: 0000000000000751 R09: 0000000000000000 R10: 00000000200cd000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004d3 R14: 00000000006f7468 R15: 0000000000000000 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: 6*4kB (UM) 4*8kB (UM) 3*16kB (UM) 3*32kB (M) 3*64kB (UM) 3*128kB (UM) 2*256kB (M) 2*512kB (M) 3*1024kB (M) 1*2048kB (M) 9*4096kB (M) = 44296kB Node 0 Normal: 1480*4kB (UMEH) 598*8kB (UMEH) 294*16kB (UMEH) 92*32kB (ME) 102*64kB (UME) 106*128kB (MEH) 8*256kB (ME) 4*512kB (ME) 12*1024kB (MH) 0*2048kB 0*4096kB = 54832kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 5688 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-executor7 (6032) used greatest stack depth: 16432 bytes left kauditd_printk_skb: 7 callbacks suppressed audit: type=1400 audit(1518809911.857:38): avc: denied { write } for pid=6091 comm="syz-executor1" name="net" dev="proc" ino=16816 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1518809911.869:39): avc: denied { add_name } for pid=6091 comm="syz-executor1" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1518809911.869:40): avc: denied { create } for pid=6091 comm="syz-executor1" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:insmod_t:s0 tclass=file permissive=1 syz1: Invalid MTU 65536 requested, hw max 65521 audit: type=1400 audit(1518809911.990:41): avc: denied { ipc_lock } for pid=6101 comm="syz-executor0" 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 syz1: Invalid MTU 65536 requested, hw max 65521 netlink: 'syz-executor5': attribute type 6 has an invalid length. audit: type=1400 audit(1518809912.063:42): avc: denied { getopt } for pid=6129 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. binder: 6186:6198 ERROR: BC_REGISTER_LOOPER called without request binder: BINDER_SET_CONTEXT_MGR already set binder: 6186:6198 ERROR: BC_REGISTER_LOOPER called without request binder: 6186:6217 ioctl 40046207 0 returned -16 binder_alloc: 6186: binder_alloc_buf, no vma binder: 6186:6232 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6186:6198 transaction 7 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 7, target dead capability: warning: `syz-executor5' uses deprecated v2 capabilities in a way that may be insecure audit: type=1400 audit(1518809912.895:43): avc: denied { create } for pid=6277 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_crypto_socket permissive=1 BUG: sleeping function called from invalid context at mm/slab.h:420 in_atomic(): 1, irqs_disabled(): 0, pid: 6291, name: syz-executor3 INFO: lockdep is turned off. CPU: 0 PID: 6291 Comm: syz-executor3 Not tainted 4.16.0-rc1+ #315 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 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6133 __might_sleep+0x95/0x190 kernel/sched/core.c:6086 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc_trace+0x299/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] rds_loop_conn_alloc+0xc8/0x380 net/rds/loop.c:126 __rds_conn_create+0x112f/0x1b50 net/rds/connection.c:227 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:309 rds_sendmsg+0xda3/0x2390 net/rds/send.c:1126 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 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007fbdadb5dc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fbdadb5e6d4 RCX: 0000000000453a59 RDX: 0000000000000000 RSI: 00000000200eafc8 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000020472ff0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004b9 R14: 00000000006f71f8 R15: 0000000000000000 audit: type=1400 audit(1518809913.390:44): avc: denied { ioctl } for pid=6302 comm="syz-executor5" path="socket:[17474]" dev="sockfs" ino=17474 ioctlcmd=0x89e1 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 binder_alloc: binder_alloc_mmap_handler: 6495 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 6495: binder_alloc_buf, no vma binder: 6495:6524 transaction failed 29189/-3, size 40-0 line 2957 sctp: [Deprecated]: syz-executor3 (pid 6519) Use of int in maxseg socket option. Use struct sctp_assoc_value instead binder: 6495:6500 ioctl 40046207 0 returned -16 binder_alloc: 6495: binder_alloc_buf, no vma binder: 6495:6527 transaction failed 29189/-3, size 0-0 line 2957 IPVS: ftp: loaded support on port[0] = 21 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered transaction 11, process died. binder: undelivered transaction 10, process died. sctp: [Deprecated]: syz-executor3 (pid 6529) Use of int in maxseg socket option. Use struct sctp_assoc_value instead IPVS: ftp: loaded support on port[0] = 21 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=26 sclass=netlink_tcpdiag_socket pig=6579 comm=syz-executor1 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=26 sclass=netlink_tcpdiag_socket pig=6588 comm=syz-executor1 mmap: syz-executor3 (6848) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.