====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. syz-executor0/7705 is trying to acquire lock: ([ 51.107025] 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: -> #1 (ashmem_mutex){+.+.+.}: [] 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 -> #0 (&mm->mmap_sem){++++++}: [] 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/7705: #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: 7705 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 9e983cd2a746c8fd ffff8800b5ce79b8 ffffffff81d0408d ffffffff851a0010 ffffffff851a0010 ffffffff851be460 ffff8801d396d0f8 ffff8801d396c800 ffff8800b5ce7a00 ffffffff81233ba1 ffff8801d396d0f8 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 binder: 7754:7758 unknown command 1077961216 binder: 7754:7758 ioctl c0306201 20008000 returned -22 binder: 7754:7758 unknown command 1077961216 binder: 7754:7758 ioctl c0306201 20008000 returned -22 netlink: 11 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor7'. binder: 7953:7954 unknown command 1078460501 binder: 7953:7954 ioctl c0306201 20007000 returned -22 binder: 7953:7972 unknown command 1078460501 binder: 7953:7972 ioctl c0306201 20007000 returned -22 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=32801 sclass=netlink_xfrm_socket device syz_tun entered promiscuous mode device syz_tun left promiscuous mode SELinux: unrecognized netlink message: protocol=4 nlmsg_type=37 sclass=netlink_tcpdiag_socket l2tp_core: tunl 1: fd 19 wrong protocol, got 1, expected 17 l2tp_core: tunl 1: fd 20 wrong protocol, got 1, expected 17 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1066 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1066 sclass=netlink_route_socket netlink: 12 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor3'. audit_printk_skb: 15 callbacks suppressed audit: type=1400 audit(1520671558.452:28): avc: denied { connect } for pid=8715 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_netfilter_socket permissive=1 IPVS: length: 542594606 != 24 IPVS: length: 542594606 != 24 netlink: 72 bytes leftover after parsing attributes in process `syz-executor1'. device bridge0 entered promiscuous mode audit: type=1400 audit(1520671560.192:30): avc: denied { set_context_mgr } for pid=9028 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 audit: type=1400 audit(1520671560.192:29): avc: denied { write } for pid=9035 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 binder: 9028:9044 unknown command 1577870094 binder: 9028:9056 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 9028:9056 ioctl c0306201 2000dfd0 returned -11 binder: 9028:9044 ioctl c0306201 20008fd0 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 9028:9056 ioctl 40046207 0 returned -16 binder: 9028:9044 unknown command 1577870094 binder: 9028:9056 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 9028:9044 ioctl c0306201 20008fd0 returned -22 sg_write: data in/out 476/235 bytes for SCSI command 0x0-- guessing data in; program syz-executor1 not setting count and/or reply_len properly audit: type=1400 audit(1520671560.802:31): avc: denied { setopt } for pid=9220 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 audit: type=1400 audit(1520671560.812:32): avc: denied { getopt } for pid=9220 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 netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. tmpfs: No value for mount option '—' SELinux: unrecognized netlink message: protocol=0 nlmsg_type=76 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8224 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8224 sclass=netlink_route_socket netlink: 4 bytes leftover after parsing attributes in process `syz-executor5'. IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 binder: 9881:9890 ioctl c018620b 20000180 returned -14 binder: 9881:9901 ioctl c018620b 20000180 returned -14 audit: type=1400 audit(1520671563.242:33): avc: denied { call } for pid=9910 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=binder permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: binder_alloc_mmap_handler: 9910 20000000-20001000 already mapped failed -16 binder: 9910:9912 ioctl 40046207 0 returned -16 binder: release 9910:9912 transaction 31 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 31, target dead audit: type=1400 audit(1520671563.662:34): avc: denied { ioctl } for pid=9997 comm="syz-executor7" path="socket:[23181]" dev="sockfs" ino=23181 ioctlcmd=8946 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(1520671563.772:35): avc: denied { create } for pid=9997 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_crypto_socket permissive=1