binder_alloc: 6668: binder_alloc_buf, no vma binder: 6668:6674 transaction failed 29189/-3, size 40-8 line 3128 binder: 6668:6685 got transaction to invalid handle binder: 6668:6685 transaction failed 29201/-22, size 0-16 line 3005 ====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- syz-executor4/6680 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [ 44.715788] binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: release 6668:6674 transaction 2 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 2, target dead [] __might_fault+0xe4/0x1d0 mm/memory.c:3809 but task is already holding lock: (ashmem_mutex){+.+.+.}, at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:701 [inline] (ashmem_mutex){+.+.+.}, at: [] ashmem_ioctl+0x367/0xfa0 drivers/staging/android/ashmem.c:778 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] ashmem_mmap+0x53/0x400 drivers/staging/android/ashmem.c:366 [] mmap_region+0x94f/0x1250 mm/mmap.c:1664 [] do_mmap+0x4fd/0x9d0 mm/mmap.c:1441 [] do_mmap_pgoff include/linux/mm.h:1915 [inline] [] vm_mmap_pgoff+0x16e/0x1c0 mm/util.c:296 [] SYSC_mmap_pgoff mm/mmap.c:1491 [inline] [] SyS_mmap_pgoff+0x33f/0x560 mm/mmap.c:1449 [] SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] [] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 [] entry_SYSCALL_64_fastpath+0x1c/0x98 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x371f/0x4b50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_from_user arch/x86/include/asm/uaccess.h:724 [inline] [] ashmem_pin_unpin drivers/staging/android/ashmem.c:706 [inline] [] ashmem_ioctl+0x3b4/0xfa0 drivers/staging/android/ashmem.c:778 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor4/6680: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:701 [inline] #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_ioctl+0x367/0xfa0 drivers/staging/android/ashmem.c:778 stack backtrace: CPU: 0 PID: 6680 Comm: syz-executor4 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 13fe3bda41fbef2e ffff8801d85479b8 ffffffff81d0408d ffffffff851a0010 ffffffff851a0010 ffffffff851be460 ffff8801c3f208f8 ffff8801c3f20000 ffff8801d8547a00 ffffffff81233ba1 ffff8801c3f208f8 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug+0x271/0x310 kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x371f/0x4b50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_from_user arch/x86/include/asm/uaccess.h:724 [inline] [] ashmem_pin_unpin drivers/staging/android/ashmem.c:706 [inline] [] ashmem_ioctl+0x3b4/0xfa0 drivers/staging/android/ashmem.c:778 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 proc: unrecognized mount option "sysfs" or missing value proc: unrecognized mount option "sysfs" or missing value netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. audit: type=1400 audit(1521117261.365:23): avc: denied { write } for pid=6748 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_generic_socket permissive=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 30 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 30 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor7'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=6400 sclass=netlink_xfrm_socket binder: 6810:6812 got reply transaction with bad transaction stack, transaction 9 has target 6810:0 audit: type=1401 audit(1521117262.085:24): op=fscreate invalid_context=73797374656D5F753A6F626A6563745F723A616E6163726F6E5F657865635F743A73300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000004000002000000000C000002000000000000100200000000002000000090000000400000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[ 46.210613] binder: 6810:6812 transaction failed 29201/-71, size 0-0 line 2936 binder: BINDER_SET_CONTEXT_MGR already set binder: 6810:6823 ioctl 40046207 0 returned -16 binder_alloc: 6810: binder_alloc_buf, no vma binder: 6810:6812 transaction failed 29189/-3, size 40-8 line 3128 binder: 6810:6823 got reply transaction with no transaction stack binder: 6810:6823 transaction failed 29201/-71, size 0-0 line 2921 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: release 6810:6812 transaction 9 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 9, target dead netlink: 17 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=60689 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=60689 sclass=netlink_route_socket netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. keychord: Insufficient bytes present for keycount 2 keychord: Insufficient bytes present for keycount 173 keychord: Insufficient bytes present for keycount 2 keychord: Insufficient bytes present for keycount 173 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: binder_alloc_mmap_handler: 7234 20000000-20001000 already mapped failed -16 binder: 7234:7241 ioctl 40046207 0 returned -16 binder: 7234:7241 got new transaction with bad transaction stack, transaction 18 has target 7234:0 binder: 7234:7241 transaction failed 29201/-71, size 582-0 line 3032 binder: release 7234:7241 transaction 18 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 18, target dead audit: type=1400 audit(1521117264.665:25): avc: denied { accept } for pid=7467 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_netfilter_socket permissive=1 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=8 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=8 sclass=netlink_xfrm_socket A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. SELinux: policydb version 2073709104 does not match my version range 15-30 netlink: 17 bytes leftover after parsing attributes in process `syz-executor0'. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: 8059:8070 unknown command 0 binder: 8059:8070 ioctl c0306201 20012000 returned -22 binder: 8059:8070 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 8059:8070 ioctl 400454de 20000240 returned -22 binder: 8059:8070 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 8059:8070 unknown command 0 binder: 8059:8070 ioctl c0306201 20012000 returned -22 binder: 8059:8087 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 8059:8096 ioctl 400454de 20000240 returned -22 binder: 8059:8097 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: 8210:8216 ioctl c0306201 20000240 returned -14 binder: BINDER_SET_CONTEXT_MGR already set binder: 8210:8226 ioctl 40046207 0 returned -16 binder: 8210:8216 ioctl c0306201 20000240 returned -14 binder_alloc: 8210: binder_alloc_buf, no vma binder: 8210:8226 transaction failed 29189/-3, size 0-0 line 3128 binder: 8210:8227 got reply transaction with no transaction stack binder: 8210:8227 transaction failed 29201/-71, size 32-0 line 2921 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 audit: type=1400 audit(1521117267.235:26): avc: denied { create } for pid=8231 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_fib_lookup_socket permissive=1 audit: type=1400 audit(1521117267.265:27): avc: denied { write } for pid=8231 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_fib_lookup_socket permissive=1 audit: type=1401 audit(1521117267.505:28): op=fscreate invalid_context=73797374656D5F753A6F626A6563745F723A616E6163726F6E5F657865635F743A733000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000audit: type=1401 audit(1521117267.615:29): op=fscreate invalid_context=73797374656D5F753A6F626A6563745F723A616E6163726F6E5F657865635F743A733000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[ 51.899752] capability: warning: `syz-executor5' uses deprecated v2 capabilities in a way that may be insecure binder: 8406:8415 ERROR: BC_REGISTER_LOOPER called without request binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: binder_alloc_mmap_handler: 8406 20000000-20002000 already mapped failed -16 binder: 8406:8449 ERROR: BC_REGISTER_LOOPER called without request binder: 8406:8434 ioctl 40046207 0 returned -16 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=6400 sclass=netlink_tcpdiag_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=6400 sclass=netlink_tcpdiag_socket binder: 8532:8540 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 8532:8547 ERROR: BC_REGISTER_LOOPER called without request binder: 8654:8659 BC_DEAD_BINDER_DONE 0000000000000000 not found ALSA: seq fatal error: cannot create timer (-19) binder: 8654:8659 IncRefs 0 refcount change on invalid ref 0 ret -22 binder: 8654:8666 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 8654:8666 IncRefs 0 refcount change on invalid ref 0 ret -22 TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ALSA: seq fatal error: cannot create timer (-19) binder: 8706:8712 unknown command 1073963781 binder: 8706:8712 ioctl c0306201 20007000 returned -22 binder: 8706:8712 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 8706:8712 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: BINDER_SET_CONTEXT_MGR already set binder: 8706:8734 ioctl 40046207 0 returned -16 binder: 8706:8747 unknown command 1073963781 binder: 8706:8747 ioctl c0306201 20007000 returned -22 binder: 8706:8738 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 8706:8734 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=4 nlmsg_type=770 sclass=netlink_tcpdiag_socket