binder: 8502:8509 BC_INCREFS_DONE u0000000000000000 no match binder: 8502:8509 ERROR: BC_REGISTER_LOOPER called without request ====================================================== binder: 8502:8520 transaction failed 29201/-22, size 625--105 line 3128 [ INFO: possible circular locking dependency detected ] 4.4.113-g962d1f3 #2 Not tainted ------------------------------------------------------- syz-executor4/8512 is trying to acquire lock: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [ 55.061491] binder: 8502:8520 BC_INCREFS_DONE u0000000000000000 no match binder: 8502:8520 ERROR: BC_REGISTER_LOOPER called without request binder: BINDER_SET_CONTEXT_MGR already set binder: 8502:8523 ioctl 40046207 0 returned -16 binder_alloc: 8502: binder_alloc_buf, no vma binder: 8502:8528 transaction failed 29189/-3, size 625--105 line 3128 [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 but task is already holding lock: (ashmem_mutex){+.+.+.}, at: [] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:330 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:272 [] SYSC_mmap_pgoff mm/mmap.c:1491 [inline] [] SyS_mmap_pgoff+0x33f/0x560 mm/mmap.c:1449 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_to_user arch/x86/include/asm/uaccess.h:760 [inline] [] filldir+0x162/0x2d0 fs/readdir.c:180 [] dir_emit_dot include/linux/fs.h:3070 [inline] [] dir_emit_dots include/linux/fs.h:3081 [inline] [] dcache_readdir+0x11e/0x7b0 fs/libfs.c:150 [] iterate_dir+0x1c8/0x420 fs/readdir.c:42 [] SYSC_getdents fs/readdir.c:215 [inline] [] SyS_getdents+0x14a/0x270 fs/readdir.c:196 [] 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 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 [] vfs_llseek+0xa2/0xd0 fs/read_write.c:260 [] ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:342 [] vfs_llseek fs/read_write.c:260 [inline] [] SYSC_lseek fs/read_write.c:285 [inline] [] SyS_lseek fs/read_write.c:276 [inline] [] C_SYSC_lseek fs/read_write.c:297 [inline] [] compat_SyS_lseek+0xeb/0x170 fs/read_write.c:295 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 1 lock held by syz-executor4/8512: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:330 stack backtrace: CPU: 0 PID: 8512 Comm: syz-executor4 Not tainted 4.4.113-g962d1f3 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 266ad02482042f02 ffff8801cece7a58 ffffffff81d028ed ffffffff851a0050 ffffffff851a9d40 ffffffff851beb60 ffff8801ce34e798 ffff8801ce34df00 ffff8801cece7aa0 ffffffff81232cc1 ffff8801ce34e798 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 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 [] vfs_llseek+0xa2/0xd0 fs/read_write.c:260 [] ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:342 [] vfs_llseek fs/read_write.c:260 [inline] [] SYSC_lseek fs/read_write.c:285 [inline] [] SyS_lseek fs/read_write.c:276 [inline] [] C_SYSC_lseek fs/read_write.c:297 [inline] [] compat_SyS_lseek+0xeb/0x170 fs/read_write.c:295 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. IPVS: Creating netns size=2552 id=10 audit: type=1326 audit(1517321796.147:24): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=8932 comm="syz-executor4" exe="/root/syz-executor4" sig=9 arch=40000003 syscall=240 compat=1 ip=0xf771dba9 code=0x0 audit: type=1326 audit(1517321796.217:25): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=8932 comm="syz-executor4" exe="/root/syz-executor4" sig=9 arch=40000003 syscall=240 compat=1 ip=0xf771dba9 code=0x0 binder_alloc: binder_alloc_mmap_handler: 9065 20000000-20002000 already mapped failed -16 binder_alloc: 9065: binder_alloc_buf, no vma binder: BINDER_SET_CONTEXT_MGR already set binder: 9065:9067 ioctl 40046207 0 returned -16 binder: 9065:9079 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 9065:9067 transaction 23 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 23, target dead binder: release 9092:9095 transaction 28 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 28, target dead binder: release 9109:9111 transaction 32 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 32, target dead binder: release 9136:9143 transaction 36 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 36, target dead binder_alloc: 9152: binder_alloc_buf, no vma binder: 9152:9157 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9166: binder_alloc_buf, no vma binder: 9166:9185 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9197: binder_alloc_buf, no vma binder: 9197:9208 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 9239:9245 transaction 46 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 46, target dead binder: release 9259:9265 transaction 50 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: 9277:9282 transaction failed 29189/-22, size 40-8 line 3005 binder: send failed reply for transaction 50, target dead binder: 9295:9300 transaction failed 29189/-22, size 40-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: 9321:9325 transaction failed 29189/-22, size 40-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9336: binder_alloc_buf, no vma binder: 9336:9340 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9364: binder_alloc_buf, no vma binder: 9364:9365 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9391: binder_alloc_buf, no vma binder: 9391:9397 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 9499:9503 transaction 63 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 63, target dead binder: release 9506:9517 transaction 67 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 67, target dead binder_alloc: 9600: binder_alloc_buf, no vma binder: 9600:9603 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9622: binder_alloc_buf, no vma binder: 9622:9623 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9661: binder_alloc_buf, no vma binder: 9661:9674 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9686: binder_alloc_buf, no vma binder: 9686:9687 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9699: binder_alloc_buf, no vma binder: 9699:9705 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 9723: binder_alloc_buf, no vma binder: 9723:9726 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: 9746:9748 transaction failed 29189/-22, size 40-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: 9763:9767 transaction failed 29189/-22, size 40-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: 9787:9788 transaction failed 29189/-22, size 40-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: 9872:9877 got transaction with invalid offset (0, min 0 max 0) or object. binder: 9872:9877 transaction failed 29201/-22, size 0-8 line 3191 binder: undelivered TRANSACTION_ERROR: 29201 binder: 9899:9906 got transaction with invalid offset (0, min 0 max 0) or object. binder: 9899:9906 transaction failed 29201/-22, size 0-8 line 3191 binder: undelivered TRANSACTION_ERROR: 29201 binder: 9921:9926 got transaction with invalid offset (0, min 0 max 0) or object. binder: 9921:9926 transaction failed 29201/-22, size 0-8 line 3191 binder: undelivered TRANSACTION_ERROR: 29201 binder: release 9943:9944 transaction 98 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 98, target dead binder: release 9946:9951 transaction 100 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 100, target dead binder: release 9955:9959 transaction 102 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 102, target dead binder: 10581:10583 got transaction with invalid offset (0, min 0 max 0) or object. binder: 10581:10583 transaction failed 29201/-22, size 0-8 line 3191 audit: type=1400 audit(1517321801.547:26): avc: denied { write } for pid=10606 comm="syz-executor6" name="737" dev="proc" ino=19778 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 binder: undelivered TRANSACTION_ERROR: 29201 binder: 10621:10625 got transaction with invalid offset (0, min 0 max 0) or object. binder: 10621:10625 transaction failed 29201/-22, size 0-8 line 3191 binder: undelivered TRANSACTION_ERROR: 29201 binder: 10652:10665 got transaction with invalid offset (0, min 0 max 0) or object. binder: 10652:10665 transaction failed 29201/-22, size 0-8 line 3191 binder: undelivered TRANSACTION_ERROR: 29201 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1