audit: type=1400 audit(1518772857.794:22): avc: denied { ipc_lock } for pid=5405 comm="syz-executor1" 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 ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #314 Not tainted ------------------------------------------------------ syz-executor7/5413 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000006c00f96a>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000006c00f96a>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000db589c71>] 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: binder: 5431:5433 BC_FREE_BUFFER u0000000000000000 no match -> #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 binder: 5431:5433 ERROR: BC_REGISTER_LOOPER called without request 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 binder: 5431:5433 ERROR: BC_ENTER_LOOPER called after BC_REGISTER_LOOPER 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_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 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 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-executor7/5413: #0: (rtnl_mutex){+.+.}, at: [<00000000db589c71>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5413 Comm: syz-executor7 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 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 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:00007f139319dc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f139319e6d4 RCX: 0000000000453a59 RDX: 0000000000000028 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 000000000000000c R09: 0000000000000000 R10: 0000000020aa6ff4 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000522 R14: 00000000006f7bd0 R15: 0000000000000000 audit: type=1400 audit(1518772858.657:23): avc: denied { ipc_owner } for pid=5476 comm="syz-executor1" 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 audit: type=1400 audit(1518772858.753:24): avc: denied { write } for pid=5502 comm="syz-executor6" name="net" dev="proc" ino=15402 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 dccp_close: ABORT with 1 bytes unread audit: type=1400 audit(1518772858.779:25): avc: denied { add_name } for pid=5502 comm="syz-executor6" 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(1518772858.779:26): avc: denied { create } for pid=5502 comm="syz-executor6" 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 audit: type=1400 audit(1518772858.790:27): avc: denied { getattr } for pid=5509 comm="syz-executor5" path="socket:[14880]" dev="sockfs" ino=14880 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 binder: 5614:5624 ioctl 5206 201c9000 returned -22 binder: 5614:5624 Acquire 1 refcount change on invalid ref -1 ret -22 binder: 5614:5624 ioctl 4b62 20eaeff8 returned -22 binder: 5614:5624 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 5614:5630 ioctl 5206 201c9000 returned -22 binder: 5614:5624 ioctl 40046207 0 returned -16 binder_alloc: 5614: binder_alloc_buf, no vma binder: 5614:5632 transaction failed 29189/-3, size 40-8 line 2957 binder: 5614:5630 ioctl 4b62 20eaeff8 returned -22 binder: 5614:5624 Acquire 1 refcount change on invalid ref -1 ret -22 binder: 5614:5630 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 5614:5624 transaction 2 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 2, target dead binder_alloc: binder_alloc_mmap_handler: 5682 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5682:5692 ioctl 40046207 0 returned -16 cgroup: cgroup2: unknown option "" binder_alloc: 5682: binder_alloc_buf, no vma binder: 5682:5692 transaction failed 29189/-3, size 40-8 line 2957 cgroup: cgroup2: unknown option "" binder: undelivered TRANSACTION_ERROR: 29189 binder: release 5682:5692 transaction 7 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 7, target dead binder: 5732 RLIMIT_NICE not set QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. QAT: Invalid ioctl binder: BINDER_SET_CONTEXT_MGR already set binder: 5710:5732 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_COMPLETE xt_connbytes: Forcing CT accounting to be enabled mmap: syz-executor5 (6029) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. ion_mmap: failure mapping buffer to userspace syz-executor2 uses obsolete (PF_INET,SOCK_PACKET) QAT: Invalid ioctl binder: 6075:6091 BC_FREE_BUFFER u0000000020000000 matched unreturned buffer binder_alloc: 6075:6091 FREE_BUFFER u0000000020000000 user freed buffer twice binder: 6075:6091 BC_FREE_BUFFER u0000000020000000 no match QAT: Invalid ioctl binder_alloc: binder_alloc_mmap_handler: 6075 20000000-20001000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6075:6091 ioctl 40046207 0 returned -16 binder_alloc: 6075: binder_alloc_buf, no vma binder: 6075:6103 transaction failed 29189/-3, size 0-0 line 2957 binder_alloc: 6075:6091 FREE_BUFFER u0000000020000000 user freed buffer twice binder: 6075:6091 BC_FREE_BUFFER u0000000020000000 no match binder_alloc: 6075:6102 FREE_BUFFER u0000000020000000 user freed buffer twice binder: 6075:6102 BC_FREE_BUFFER u0000000020000000 no match binder: release 6075:6091 transaction 14 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 14, target dead kvm [6107]: vcpu2, guest rIP: 0xfff0 Hyper-V uhandled wrmsr: 0x4000006f data 0x0 kvm [6107]: vcpu2, guest rIP: 0xfff0 Hyper-V uhandled wrmsr: 0x4000006f data 0x0 capability: warning: `syz-executor0' uses 32-bit capabilities (legacy support in use) binder_alloc: binder_alloc_mmap_handler: 6160 20000000-20002000 already mapped failed -16 device eql entered promiscuous mode ptrace attach of "/root/syz-executor1"[4209] was attempted by "/root/syz-executor1"[6213] ptrace attach of "/root/syz-executor1"[4209] was attempted by "/root/syz-executor1"[6200] 9pnet_virtio: no channels available for device ./file1 9pnet_virtio: no channels available for device ./file1 netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. xt_cluster: you have exceeded the maximum number of cluster nodes (52470 > 32) xt_cluster: you have exceeded the maximum number of cluster nodes (52470 > 32) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1 sclass=netlink_route_socket pig=6438 comm=syz-executor3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1 sclass=netlink_route_socket pig=6443 comm=syz-executor3 sctp: [Deprecated]: syz-executor4 (pid 6463) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor4 (pid 6463) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead binder: 6481 RLIMIT_NICE not set binder: 6475:6493 transaction failed 29189/-22, size 0-0 line 2842 binder: 6475:6503 transaction failed 29189/-22, size 0-0 line 2842 Cannot find add_set index 52795 as target netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl sctp: [Deprecated]: syz-executor5 (pid 6842) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead device syz4 entered promiscuous mode sctp: [Deprecated]: syz-executor5 (pid 6842) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead kernel msg: ebtables bug: please report to author: Wrong len argument device syz4 left promiscuous mode mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium kernel msg: ebtables bug: please report to author: Wrong len argument netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'. xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables IPv4: Oversized IP packet from 127.0.0.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35 sclass=netlink_route_socket pig=7056 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35 sclass=netlink_route_socket pig=7061 comm=syz-executor2 xt_CT: No such helper "snmp_trap" xt_CT: No such helper "snmp_trap" kauditd_printk_skb: 23 callbacks suppressed audit: type=1400 audit(1518772865.358:51): avc: denied { map } for pid=7243 comm="syz-executor1" path="/dev/adsp1" dev="devtmpfs" ino=1150 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sound_device_t:s0 tclass=chr_file permissive=1 device eql entered promiscuous mode audit: type=1400 audit(1518772865.830:52): avc: denied { create } for pid=7402 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_crypto_socket permissive=1 device eql entered promiscuous mode xt_AUDIT: Audit type out of range (valid range: 0..2) xt_AUDIT: Audit type out of range (valid range: 0..2) arp_tables: arptables: counters copy to user failed while replacing table arp_tables: arptables: counters copy to user failed while replacing table syz-executor5 (7503): /proc/7500/oom_adj is deprecated, please use /proc/7500/oom_score_adj instead. netlink: 220 bytes leftover after parsing attributes in process `syz-executor3'. x_tables: ip6_tables: mh match: only valid for protocol 135 x_tables: ip6_tables: mh match: only valid for protocol 135 device eql entered promiscuous mode audit: type=1400 audit(1518772866.573:53): avc: denied { map } for pid=7636 comm="syz-executor4" path="/dev/loop0" dev="devtmpfs" ino=1073 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file permissive=1 binder_alloc: binder_alloc_mmap_handler: 7641 20000000-20002000 already mapped failed -16 syz-executor7: vmalloc: allocation failure, allocated 2805694464 of 4294971392 bytes, mode:0x14010c0(GFP_KERNEL|__GFP_NORETRY), nodemask=(null) syz-executor7: vmalloc: allocation failure, allocated 2817540096 of 4294971392 bytes, mode:0x14010c0(GFP_KERNEL|__GFP_NORETRY), nodemask=(null) syz-executor7 cpuset=/ mems_allowed=0 CPU: 1 PID: 7607 Comm: syz-executor7 Not tainted 4.16.0-rc1+ #314 syz-executor7 cpuset= 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 / mems_allowed=0 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/ipv6/netfilter/ip6_tables.c:1149 [inline] do_ip6t_set_ctl+0x29b/0x5f0 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x10b/0x130 net/ipv6/ipv6_sockglue.c:927 udpv6_setsockopt+0x45/0x80 net/ipv6/udp.c:1422 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:00007f139315bc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f139315c6d4 RCX: 0000000000453a59 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000013 RBP: 000000000071c010 R08: 00000000000006c8 R09: 0000000000000000 R10: 0000000020fdb000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004d4 R14: 00000000006f7480 R15: 0000000000000002 CPU: 0 PID: 7586 Comm: syz-executor7 Not tainted 4.16.0-rc1+ #314 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