====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #29 Not tainted ------------------------------------------------------- syz-executor4/5164 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [ 43.999895] audit: type=1400 audit(1521227792.116:5): avc: denied { create } for pid=5162 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_generic_socket permissive=1 [] __might_fault+0xe4/0x1d0 mm/memory.c:3809 capability: warning: `syz-executor1' uses 32-bit capabilities (legacy support in use) 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 audit: type=1400 audit(1521227792.116:6): avc: denied { setattr } for pid=5192 comm="syz-executor3" name="keycreate" dev="proc" ino=12738 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=file permissive=1 audit: type=1400 audit(1521227792.116:7): avc: denied { set_context_mgr } for pid=5184 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=binder permissive=1 binder: 5184:5195 got transaction to invalid handle binder: 5184:5195 transaction failed 29201/-22, size 0-2361363287496513792 line 3005 binder: BINDER_SET_CONTEXT_MGR already set binder: 5184:5195 ioctl 40046207 0 returned -16 binder: 5184:5200 got transaction to invalid handle binder: 5184:5200 transaction failed 29201/-22, size 0-2361363287496513792 line 3005 [] 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 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x321/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 [] 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 [] compat_ashmem_ioctl+0x3e/0x50 drivers/staging/android/ashmem.c:809 [] C_SYSC_ioctl fs/compat_ioctl.c:1592 [inline] [] compat_SyS_ioctl+0x28a/0x2540 fs/compat_ioctl.c:1544 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x321/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 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/5164: #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: 5164 Comm: syz-executor4 Not tainted 4.4.120-gd63fdf6 #29 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 a568a0a48f8ecb9f ffff8800aec2f8a8 ffffffff81d0408d ffffffff8519fe60 ffffffff8519fe60 ffffffff851becd0 ffff8800b4af50f8 ffff8800b4af4800 ffff8800aec2f8f0 ffffffff81233ba1 ffff8800b4af50f8 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 [] compat_ashmem_ioctl+0x3e/0x50 drivers/staging/android/ashmem.c:809 [] C_SYSC_ioctl fs/compat_ioctl.c:1592 [inline] [] compat_SyS_ioctl+0x28a/0x2540 fs/compat_ioctl.c:1544 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x321/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 device syz_tun entered promiscuous mode device syz_tun left promiscuous mode TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1400 audit(1521227793.396:8): avc: denied { bind } for pid=5362 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_generic_socket permissive=1 audit: type=1400 audit(1521227793.506:9): avc: denied { create } for pid=5407 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 audit: type=1400 audit(1521227793.526:10): avc: denied { write } for pid=5407 comm="syz-executor4" path="socket:[13006]" dev="sockfs" ino=13006 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: 5448:5449 transaction failed 29189/-22, size 40-8 line 3005 binder_alloc: binder_alloc_mmap_handler: 5448 20000000-20002000 already mapped failed -16 binder: 5448:5449 transaction failed 29189/-22, size 40-8 line 3005 binder: BINDER_SET_CONTEXT_MGR already set binder: 5504:5508 ioctl 40046207 0 returned -16 binder: 5543:5546 transaction failed 29189/-22, size 40-8 line 3005 binder: 5545:5551 BC_INCREFS_DONE u1c24000000000001 no match binder: 5545:5551 unknown command 1819811011 binder: 5545:5551 ioctl c0306201 20a94fd0 returned -22 binder: 5545:5558 BC_INCREFS_DONE u1c24000000000001 no match binder: 5545:5558 unknown command 1819811011 binder: 5545:5558 ioctl c0306201 20a94fd0 returned -22 binder: undelivered TRANSACTION_ERROR: 29189 sd 0:0:1:0: [sg0] tag#149 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#149 CDB: Test Unit Ready sd 0:0:1:0: [sg0] tag#149 CDB[00]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#149 CDB[10]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#149 CDB[20]: 00 00 00 sd 0:0:1:0: [sg0] tag#149 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#149 CDB: Test Unit Ready sd 0:0:1:0: [sg0] tag#149 CDB[00]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#149 CDB[10]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#149 CDB[20]: 00 00 00 binder: 5723:5726 ERROR: BC_REGISTER_LOOPER called without request binder: 5723:5726 ERROR: BC_ENTER_LOOPER called after BC_REGISTER_LOOPER binder: 5829:5833 unknown command -73263710 binder: 5829:5833 ioctl c0306201 20008fd0 returned -22 binder: 5829:5833 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 5829:5833 unknown command -73263710 binder: 5829:5833 ioctl c0306201 20008fd0 returned -22 audit: type=1401 audit(1521227796.596:11): op=setxattr invalid_context=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000audit: type=1401 audit(1521227796.696:12): op=setxattr invalid_context=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000060000000000000001004A0FEC000000000000000A004E230000000000000000000000000000FFFF00000000FFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000400000001000000F7FFFFFF3B5D000000000000000000000000000000000000B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[ 48.705261] audit: type=1400 audit(1521227796.856:13): avc: denied { getopt } for pid=6089 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_generic_socket permissive=1 binder: 6133:6140 transaction failed 29189/-22, size 40-8 line 3005 binder: 6133:6140 BC_INCREFS_DONE u0000000000000000 no match binder: 6133:6152 transaction failed 29189/-22, size 40-8 line 3005 binder: 6160:6162 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 6160:6162 unknown command 0 binder: 6160:6162 ioctl c0306201 20007000 returned -22 binder: 6160:6162 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 6160:6177 unknown command 0 binder: 6160:6177 ioctl c0306201 20007000 returned -22 keychord: invalid keycode count 0 keychord: keycode 8270 out of range keychord: invalid keycode count 0 Empty option to dns_resolver key Empty option to dns_resolver key TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit_printk_skb: 3 callbacks suppressed audit: type=1400 audit(1521227798.466:15): avc: denied { create } for pid=6524 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_crypto_socket permissive=1 keychord: using input dev AT Translated Set 2 keyboard for fevent keychord: using input dev AT Translated Set 2 keyboard for fevent SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8611 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8611 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=47716 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=47716 sclass=netlink_route_socket audit: type=1400 audit(1521227799.526:16): avc: denied { call } for pid=6749 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 binder: 6749:6770 ioctl c0306201 20000000 returned -14 netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 6749: binder_alloc_buf, no vma binder: 6749:6760 ioctl 40046207 0 returned -16 binder: 6749:6770 transaction failed 29189/-3, size 0-0 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 sg_write: data in/out 2020961861/194 bytes for SCSI command 0x0-- guessing data in; program syz-executor2 not setting count and/or reply_len properly binder: undelivered TRANSACTION_COMPLETE binder: undelivered transaction 19, process died. Option ' "#Z f. v(He Kyq mR#YϱP#)Ko[ 51.892470] blk_update_request: I/O error, dev loop0, sector 0 binder: BINDER_SET_CONTEXT_MGR already set binder: 6892:6894 ioctl 40046207 0 returned -16 blk_update_request: I/O error, dev loop0, sector 0 Option ' "#Z f. v(He Kyq mR#YϱP#)Ko[ 52.861211] audit: type=1400 audit(1521227801.006:17): avc: denied { getopt } for pid=7003 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_netfilter_socket permissive=1 binder_alloc: binder_alloc_mmap_handler: 7003 20001000-20003000 already mapped failed -16 device bridge0 entered promiscuous mode audit: type=1326 audit(1521227801.276:18): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7062 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf7748ba9 code=0x0 audit: type=1400 audit(1521227801.346:19): avc: denied { ioctl } for pid=7088 comm="syz-executor0" path="socket:[16761]" dev="sockfs" ino=16761 ioctlcmd=89a1 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 audit: type=1326 audit(1521227801.386:20): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7062 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf7748ba9 code=0x0 device bridge0 entered promiscuous mode binder: release 7208:7212 transaction 23 out, still active binder: undelivered TRANSACTION_COMPLETE binder: BINDER_SET_CONTEXT_MGR already set binder: 7208:7212 ioctl 40046207 0 returned -16 binder_alloc: 7208: binder_alloc_buf, no vma binder: 7208:7216 transaction failed 29189/-3, size 0-0 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 23, target dead audit: type=1400 audit(1521227801.956:21): avc: denied { ioctl } for pid=7247 comm="syz-executor5" path="socket:[16926]" dev="sockfs" ino=16926 ioctlcmd=891c 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 audit: type=1400 audit(1521227801.986:22): avc: denied { write } for pid=7247 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