binder: 9619:9622 ioctl c0306201 204edfd0 returned -14 ====================================================== [ INFO: possible circular locking dependency detected ] binder: 9619:9622 got reply transaction with bad transaction stack, transaction 22 has target 9619:0 binder: 9619:9622 transaction failed 29201/-71, size 36-0 line 2936 binder: BINDER_SET_CONTEXT_MGR already set binder: 9619:9637 ioctl 40046207 0 returned -16 binder: 9619:9637 ioctl c0306201 204edfd0 returned -14 binder_alloc: 9619: binder_alloc_buf, no vma binder: 9619:9637 transaction failed 29189/-3, size 0-0 line 3128 binder: 9619:9622 got reply transaction with no transaction stack binder: 9619:9622 transaction failed 29201/-71, size 36-0 line 2921 binder: release 9619:9622 transaction 22 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 22, target dead 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- syz-executor4/9630 is trying to acquire lock: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] 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: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 [] 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+0xeb/0x170 fs/read_write.c:276 [] entry_SYSCALL_64_fastpath+0x1c/0x98 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/9630: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:330 stack backtrace: CPU: 0 PID: 9630 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 13df7fa671363e6d ffff8801c5f8fad8 ffffffff81d0408d ffffffff8519fe60 ffffffff851a9b50 ffffffff851be460 ffff8801c776d0f8 ffff8801c776c800 ffff8801c5f8fb20 ffffffff81233ba1 ffff8801c776d0f8 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+0xeb/0x170 fs/read_write.c:276 [] entry_SYSCALL_64_fastpath+0x1c/0x98 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=22137 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=22137 sclass=netlink_xfrm_socket binder: 9866:9869 got transaction to invalid handle binder: 9866:9869 transaction failed 29201/-22, size 0-8 line 3005 binder: 9866:9869 got transaction to invalid handle binder: 9866:9869 transaction failed 29201/-22, size 0-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 sg_write: data in/out 524252/118 bytes for SCSI command 0x0-- guessing data in; program syz-executor2 not setting count and/or reply_len properly audit: type=1401 audit(1521793100.357:37): op=setxattr invalid_context="" audit: type=1401 audit(1521793100.397:38): op=setxattr invalid_context="" IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. IPv6: NLM_F_CREATE should be set when creating new route netlink: 8 bytes leftover after parsing attributes in process `syz-executor0'. audit: type=1400 audit(1521793100.767:39): avc: denied { getattr } for pid=10064 comm="syz-executor2" 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 IPv6: Can't replace route, no match found SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket device syz_tun entered promiscuous mode binder: release 10294:10300 transaction 29 in, still active binder: send failed reply for transaction 29 to 10294:10309 device syz_tun left promiscuous mode binder_alloc: binder_alloc_mmap_handler: 10294 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10294:10300 ioctl 40046207 0 returned -16 binder_alloc: 10294: binder_alloc_buf, no vma binder: 10294:10300 transaction failed 29189/-3, size 0-0 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: 10363:10366 ioctl c0306201 2000afd0 returned -14 binder_alloc: binder_alloc_mmap_handler: 10363 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10363:10366 ioctl 40046207 0 returned -16 binder: 10363:10366 ioctl c0306201 2000afd0 returned -14 audit: type=1400 audit(1521793102.047:40): avc: denied { bind } for pid=10388 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 SELinux: unknown mount option TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket binder: 10585:10587 got transaction to invalid handle binder: 10585:10587 transaction failed 29201/-22, size -4978215534892220639-2761086424 line 3005 binder: BINDER_SET_CONTEXT_MGR already set binder: 10585:10587 ioctl 40046207 0 returned -16 binder: 10585:10589 got transaction to invalid handle binder: 10585:10589 transaction failed 29201/-22, size -4978215534892220639-2761086424 line 3005 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1326 audit(1521793103.407:41): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10723 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x454239 code=0x0 audit: type=1326 audit(1521793103.437:42): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10723 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x454239 code=0x0 IPv6: Can't replace route, no match found binder: 10764:10767 got transaction to invalid handle nla_parse: 2 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor7'. binder: 10764:10767 transaction failed 29201/-22, size 64-8 line 3005 binder: 10764:10782 got transaction to invalid handle binder: 10764:10782 transaction failed 29201/-22, size 0-0 line 3005 binder: 10764:10767 got transaction to invalid handle binder: 10764:10782 got transaction to invalid handle binder: 10764:10767 transaction failed 29201/-22, size 64-8 line 3005 binder: 10764:10782 transaction failed 29201/-22, size 0-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: 10812:10816 ioctl c018620b 20000000 returned -14 binder: 10812:10816 ioctl c018620b 20000000 returned -14 binder_alloc: binder_alloc_mmap_handler: 10822 20000000-20002000 already mapped failed -16 binder: 10832:10836 got transaction with invalid data ptr binder_alloc: binder_alloc_mmap_handler: 10822 20000000-20002000 already mapped failed -16 binder: 10832:10836 transaction failed 29201/-14, size 40-8 line 3147 binder: BINDER_SET_CONTEXT_MGR already set binder: 10832:10850 ioctl 40046207 0 returned -16 binder: 10862:10867 transaction failed 29189/-22, size 60160-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 11026 Comm: syz-executor5 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801c189e000 task.stack: ffff8800b8b50000 RIP: 0010:[] [] sg_read_oxfer drivers/scsi/sg.c:1976 [inline] RIP: 0010:[] [] sg_read+0xd17/0x1490 drivers/scsi/sg.c:530 RSP: 0018:ffff8800b8b57bc0 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff825bab1e RDX: 0000000000000000 RSI: ffffc900038cc000 RDI: ffff8800b8da2270 RBP: ffff8800b8b57cd0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 1ffff1001716af3e R12: 000000007fffefdc R13: 0000000000000000 R14: ffff8800ba626f00 R15: ffff8800b8da2240 FS: 00007fc54ea4b700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff400d9fe8 CR3: 00000000b17ec000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: 0000000000000001 ffffffff83fcacd0 ffffffff81b4b440 ffff8800b8da2258 000000000007ffff ffff8800b8da2268 000000007ffff000 00000000ffffffff ffff8800b7054780 0000000000001000 1ffff1001716af84 0000000020000024 Call Trace: [] __vfs_read+0x103/0x440 fs/read_write.c:432 [] vfs_read+0x123/0x3a0 fs/read_write.c:454 [] SYSC_read fs/read_write.c:569 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:562 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Code: 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 97 06 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 28 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 6b 06 00 00 48 8b 1b 48 85 db 0f 84 3b 03 00 RIP [] sg_read_oxfer drivers/scsi/sg.c:1976 [inline] RIP [] sg_read+0xd17/0x1490 drivers/scsi/sg.c:530 RSP ---[ end trace a4edb42d3a913cb5 ]---