[ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- syz-executor2/7865 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [ 57.907069] binder: 7852:7859 BC_DEAD_BINDER_DONE 0000000000000000 not found netlink: 64 bytes leftover after parsing attributes in process `syz-executor6'. [] __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-executor2/7865: #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: 7865 Comm: syz-executor2 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 1840460d15525282 ffff8800b5d8f9b8 ffffffff81d0408d ffffffff8519fe60 ffffffff8519fe60 ffffffff851be7c0 ffff8800b5e0d0f8 ffff8800b5e0c800 ffff8800b5d8fa00 ffffffff81233ba1 ffff8800b5e0d0f8 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 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=46 sclass=netlink_tcpdiag_socket ALSA: seq fatal error: cannot create timer (-19) ALSA: seq fatal error: cannot create timer (-19) netlink: 68 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 68 bytes leftover after parsing attributes in process `syz-executor7'. l2tp_core: tunl 1: fd 19 wrong protocol, got 1, expected 17 l2tp_core: tunl 1: fd 21 wrong protocol, got 1, expected 17 binder_alloc: 8131: binder_alloc_buf, no vma binder: 8131:8136 transaction failed 29189/-3, size -977305859318707139-1837309874 line 3128 binder: BINDER_SET_CONTEXT_MGR already set binder: 8131:8136 ioctl 40046207 0 returned -16 binder_alloc: 8131: binder_alloc_buf, no vma binder: 8131:8148 transaction failed 29189/-3, size -977305859318707139-1837309874 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: 8173:8181 ioctl 89a1 20000000 returned -22 binder: 8173:8195 got reply transaction with no transaction stack binder: 8173:8195 transaction failed 29201/-71, size 0-0 line 2921 binder: BINDER_SET_CONTEXT_MGR already set binder: 8173:8195 ioctl 40046207 0 returned -16 binder_alloc: 8173: binder_alloc_buf, no vma binder: 8173:8195 ioctl 89a1 20000000 returned -22 binder: 8173:8195 got reply transaction with no transaction stack binder: 8173:8195 transaction failed 29201/-71, size 0-0 line 2921 binder: 8173:8181 transaction failed 29189/-3, size 0-0 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: release 8173:8181 transaction 16 out, still active binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 16, target dead IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 device bridge0 entered promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode audit: type=1400 audit(1520658866.512:26): avc: denied { getopt } for pid=8571 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_netfilter_socket permissive=1 binder: 8585:8594 ioctl 40046205 20000000400000 returned -22 netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. binder: BINDER_SET_CONTEXT_MGR already set netlink: 17 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 17 bytes leftover after parsing attributes in process `syz-executor4'. binder: 8582:8595 ioctl 40046207 0 returned -16 netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. tmpfs: No value for mount option '*{+;7do!@[JqQ 5^5M߾o1F,8' tmpfs: No value for mount option '*{+;7do!@[JqQ 5^5M߾o1F,8%' netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=42904 sclass=netlink_route_socket binder: 8884:8890 ioctl c0306201 20000080 returned -14 binder: 8884:8911 ioctl c0306201 20004000 returned -14 binder_alloc: binder_alloc_mmap_handler: 8884 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 8884:8917 ioctl c0306201 20000080 returned -14 binder: 8884:8911 ioctl 40046207 0 returned -16 binder: 8944:8945 transaction failed 29189/-22, size 0-0 line 3005 binder: 8944:8945 ioctl 8010aa01 20000000 returned -22 binder: undelivered TRANSACTION_ERROR: 29189 binder: 8944:8945 transaction failed 29189/-22, size 0-0 line 3005 binder: 8944:8972 ioctl 8010aa01 20000000 returned -22 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1520658868.442:27): avc: denied { getattr } for pid=8991 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_netfilter_socket permissive=1 binder: 9061:9069 transaction failed 29201/-28, size 0-0 line 3128 audit: type=1400 audit(1520658868.672:28): avc: denied { setopt } for pid=9058 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 binder: BINDER_SET_CONTEXT_MGR already set binder: 9061:9069 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29201 nla_parse: 6 callbacks suppressed netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 17 bytes leftover after parsing attributes in process `syz-executor7'. device syz_tun entered promiscuous mode netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor6'. audit: type=1400 audit(1520658869.472:29): avc: denied { create } for pid=9324 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_fib_lookup_socket permissive=1 audit: type=1400 audit(1520658869.472:30): avc: denied { write } for pid=9324 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_fib_lookup_socket permissive=1 IPv4: Oversized IP packet from 127.0.0.1 device syz_tun left promiscuous mode IPv4: Oversized IP packet from 127.0.0.1 netlink: 12 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=39953 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=39953 sclass=netlink_route_socket FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 0 PID: 9453 Comm: syz-executor0 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 54133664ef62ee5b ffff8801d928f970 ffffffff81d0408d ffff8801d0f19e00 1ffff1003b251f3b ffff8801d928faf8 0000000000000000 0000000000000000 ffff8801d928fb20 ffffffff81607305 ffffffff81237410 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] handle_userfault+0x715/0xf50 fs/userfaultfd.c:316 [] do_anonymous_page mm/memory.c:2731 [inline] [] handle_pte_fault mm/memory.c:3295 [inline] [] __handle_mm_fault mm/memory.c:3426 [inline] [] handle_mm_fault+0x2938/0x3190 mm/memory.c:3455 [] __do_page_fault+0x35b/0xa00 arch/x86/mm/fault.c:1245 [] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1308 [] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1033 [] entry_SYSCALL_64_fastpath+0x1c/0x98 binder: 9629:9636 unknown command 1023 binder: 9629:9636 ioctl c0306201 20008fd0 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 9629:9636 ioctl 40046207 0 returned -16 binder: 9870:9884 ioctl c0306201 20008000 returned -14 SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c binder: 9870:9884 unknown command 1075077896 binder: BINDER_SET_CONTEXT_MGR already set binder: 9870:9895 ioctl 40046207 0 returned -16 binder: 9870:9884 ioctl c0306201 20a94fd0 returned -22 SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c binder_alloc: binder_alloc_mmap_handler: 9870 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 9870:9895 ioctl c0306201 20008000 returned -14 binder: 9870:9884 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 9870:9919 ioctl 40046207 0 returned -16 binder: 9870:9895 unknown command 1075077896 binder: 9870:9895 ioctl c0306201 20a94fd0 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 9870:9919 ioctl 40046207 0 returned -16 TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 tc_dump_action: action bad kind tc_dump_action: action bad kind binder: 10101:10105 ioctl c0306201 200000c0 returned -14 binder: 10101:10105 ioctl c0306201 20012000 returned -14 binder: 10101:10126 ioctl c0306201 200000c0 returned -14 rfkill: input handler disabled rfkill: input handler enabled SELinux: unrecognized netlink message: protocol=6 nlmsg_type=5648 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=5648 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=770 sclass=netlink_tcpdiag_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=770 sclass=netlink_tcpdiag_socket syz-executor5 (10462) used greatest stack depth: 23656 bytes left audit: type=1400 audit(1520658873.102:31): avc: denied { setattr } for pid=10579 comm="syz-executor6" name="NETLINK" dev="sockfs" ino=23504 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 binder_alloc: 10633: binder_alloc_buf, no vma binder: 10633:10641 transaction failed 29189/-3, size 0-0 line 3128 binder: BINDER_SET_CONTEXT_MGR already set binder: 10633:10643 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29189 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=63538 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=63538 sclass=netlink_route_socket