====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- syz-executor0/5713 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [] __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-executor0/5713: #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: 1 PID: 5713 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 85e129c0bcb67a84 ffff8801c25df9b8 ffffffff81d0408d ffffffff851a0010 ffffffff851a0010 ffffffff851be7c0 ffff8800adce20f8 ffff8800adce1800 ffff8801c25dfa00 ffffffff81233ba1 ffff8800adce20f8 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 audit: type=1400 audit(1520608881.285:13): avc: denied { create } for pid=5793 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_connector_socket permissive=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. mmap: syz-executor2 (5981) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. device syz_tun entered promiscuous mode device syz_tun left promiscuous mode SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket audit_printk_skb: 3 callbacks suppressed audit: type=1400 audit(1520608883.295:15): avc: denied { read } for pid=6359 comm="syz-executor7" path="socket:[14792]" dev="sockfs" ino=14792 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: 6436:6444 got transaction with invalid data ptr binder: 6436:6444 transaction failed 29201/-14, size 40-8 line 3147 binder: BINDER_SET_CONTEXT_MGR already set binder: 6436:6467 ioctl 40046207 0 returned -16 binder_alloc: 6436: binder_alloc_buf, no vma binder: 6436:6467 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1401 audit(1520608884.455:16): op=setxattr invalid_context="" syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) audit: type=1401 audit(1520608884.495:17): op=setxattr invalid_context="" audit: type=1400 audit(1520608884.825:18): avc: denied { attach_queue } for pid=6687 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=tun_socket permissive=1 TCP: request_sock_TCP: Possible SYN flooding on port 20000. Sending cookies. Check SNMP counters. tmpfs: No value for mount option '—' tmpfs: No value for mount option '—' netlink: 6 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 6 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 6 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 6 bytes leftover after parsing attributes in process `syz-executor2'. IPVS: Unknown mcast interface: IPVS: Unknown mcast interface: SELinux: policydb string length -1512820449 does not match expected length 8 SELinux: policydb magic number 0x7b10b999 does not match expected magic number 0xf97cff8c syz-executor6 (7377): /proc/7375/oom_adj is deprecated, please use /proc/7375/oom_score_adj instead. SELinux: unknown mount option SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket ALSA: seq fatal error: cannot create timer (-22) ALSA: seq fatal error: cannot create timer (-22) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=15 sclass=netlink_route_socket IPVS: length: 683 != 24 IPVS: length: 683 != 24 audit: type=1401 audit(1520608888.705:19): op=setxattr invalid_context=6B65C0FDCA9030000000000000000070F78276EA5F83BDB62EF382A71C8CFD152D4F5D2D972EDAB4D338EF8309B2899C2FABFE0ADD921056FA6B2F45F229FEF7DC7442DDF68792B204A774CD7320E3404A9D2FCA3DDFBE7CEDBED0B5F239A0EAA9B9DAAFFE9391BC48A30B3A478022DAE0C9B6FEA37ACA49E69D1888619D7DBDBD1FB2746197D5E84216412D005476B38214F2B187C6F6910C8F1EC6C30132D7F7EF16816A82D1DB47981BEAC5EF9C891C271C85CB1221845493811C67E3DE7A323D0EDAC201637FB6C8ACCC2BDAF99270CDA298734E8E8D0BF45D7B3804D066C4272C047D45F2500101CCF991D4AA9DD9C22AECD4B754A6BBE985B1E03BAB73AF3AB46855F15F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000audit: type=1401 audit(1520608888.805:20): op=setxattr invalid_context=6B65C0FDCA9030000000000000000070F78276EA5F83BDB62EF382A71C8CFD152D4F5D2D972EDAB4D338EF8309B2899C2FABFE0ADD921056FA6B2F45F229FEF7DC7442DDF68792B204A774CD7320E3404A9D2FCA3DDFBE7CEDBED0B5F239A0EAA9B9DAAFFE9391BC48A30B3A478022DAE0C9B6FEA37ACA49E69D1888619D7DBDBD1FB2746197D5E84216412D005476B38214F2B187C6F6910C8F1EC6C30132D7F7EF16816A82D1DB47981BEAC5EF9C891C271C85CB1221845493811C67E3DE7A323D0EDAC201637FB6C8ACCC2BDAF99270CDA298734E8E8D0BF45D7B3804D066C4272C047D45F2500101CCF991D4AA9DD9C22AECD4B754A6BBE985B1E03BAB73AF3AB46855F15F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[ 54.303494] SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65259 sclass=netlink_route_socket binder: 8063:8067 transaction failed 29189/-22, size 56-8 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43558 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43558 sclass=netlink_route_socket audit: type=1400 audit(1520608890.445:21): avc: denied { create } for pid=8472 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_crypto_socket permissive=1