====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #29 Not tainted ------------------------------------------------------- device lo entered promiscuous mode syz-executor1/5490 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [ 40.875073] netlink: 24 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor7'. [] __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 [ 40.960311] audit: type=1400 audit(1521906594.479:13): avc: denied { read } for pid=5523 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_generic_socket permissive=1 [] 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-executor1/5490: #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: 5490 Comm: syz-executor1 Not tainted 4.4.120-gd63fdf6 #29 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 830c6f78dbe25f08 ffff8800a65ef8a8 ffffffff81d0408d ffffffff8519fe60 ffffffff8519fe60 ffffffff851becd0 ffff8800a65e08f8 ffff8800a65e0000 ffff8800a65ef8f0 ffffffff81233ba1 ffff8800a65e08f8 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 lo left promiscuous mode capability: warning: `syz-executor0' uses 32-bit capabilities (legacy support in use) 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 audit: type=1400 audit(1521906595.559:14): avc: denied { call } for pid=5652 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: 5673:5680 got transaction to invalid handle binder: 5673:5680 transaction failed 29201/-22, size 0-0 line 3005 binder: BINDER_SET_CONTEXT_MGR already set binder: 5673:5680 ioctl c0086421 200000c0 returned -22 binder: 5673:5680 got transaction to invalid handle binder: 5673:5680 transaction failed 29201/-22, size 0-0 line 3005 binder: 5673:5680 ioctl c0086421 200000c0 returned -22 binder: 5652:5670 ioctl 40046207 0 returned -16 binder_alloc: 5652: binder_alloc_buf, no vma binder: 5652:5670 transaction failed 29189/-3, size 0-0 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 3 to 5652:5670 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 5696:5707 unknown command -608279803 binder: 5696:5707 ioctl c0306201 20012000 returned -22 binder: 5696:5707 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: BINDER_SET_CONTEXT_MGR already set binder: 5714:5716 ioctl 40046207 0 returned -16 binder: 5696:5707 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 5696:5707 unknown command -608279803 binder: 5696:5719 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 5696:5707 ioctl c0306201 20012000 returned -22 binder: 5696:5732 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 IPVS: Creating netns size=2552 id=9 binder: 5932:5950 transaction failed 29189/-22, size 537635865328551873-9144696981712340439 line 3005 binder: 5932:5950 transaction failed 29189/-22, size 537635865328551873-9144696981712340439 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: 5982:5990 ioctl c0306201 20004000 returned -14 binder: BINDER_SET_CONTEXT_MGR already set binder: 5982:6006 ioctl 40046207 0 returned -16 binder_alloc: 5982: binder_alloc_buf, no vma binder: 5982:5990 transaction failed 29189/-3, size 0-0 line 3128 binder: 5982:6012 got reply transaction with no transaction stack binder: 5982:6012 transaction failed 29201/-71, size 0-0 line 2921 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_COMPLETE binder: undelivered transaction 16, process died. netlink: 11 bytes leftover after parsing attributes in process `syz-executor3'. syz-executor4 uses obsolete (PF_INET,SOCK_PACKET) audit: type=1400 audit(1521906597.869:15): avc: denied { read } for pid=6072 comm="syz-executor3" path="socket:[14374]" dev="sockfs" ino=14374 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: 11 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=63496 sclass=netlink_route_socket binder: 6226:6233 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 6226:6233 got transaction to invalid handle binder: 6235:6240 BC_INCREFS_DONE u17a21a5350624daf no match binder: 6235:6240 unknown command -268348074 binder: 6235:6240 ioctl c0306201 20000500 returned -22 binder: 6235:6240 ioctl c0105303 20000080 returned -22 binder: 6235:6241 BC_INCREFS_DONE u17a21a5350624daf no match binder: 6235:6241 unknown command -268348074 binder: 6235:6241 ioctl c0306201 20000500 returned -22 binder: 6235:6240 ioctl c0105303 20000080 returned -22 binder: 6226:6233 transaction failed 29201/-22, size 24-0 line 3005 binder: 6226:6233 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 6226:6233 got transaction to invalid handle binder: 6226:6233 transaction failed 29201/-22, size 24-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder: BINDER_SET_CONTEXT_MGR already set binder: 6290:6309 ioctl 40046207 0 returned -16 audit: type=1326 audit(1521906598.769:16): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6331 comm="syz-executor7" exe="/root/syz-executor7" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf7717ba9 code=0x0 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ALSA: seq fatal error: cannot create timer (-16) audit: type=1326 audit(1521906598.849:17): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6331 comm="syz-executor7" exe="/root/syz-executor7" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf7717ba9 code=0x0 ALSA: seq fatal error: cannot create timer (-16) binder_alloc: 6407: binder_alloc_buf, no vma binder: 6407:6411 transaction failed 29189/-3, size 0-0 line 3128 binder: BINDER_SET_CONTEXT_MGR already set binder: 6407:6414 ioctl 40046207 0 returned -16 audit: type=1326 audit(1521906599.179:18): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6421 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf779dba9 code=0x0 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1326 audit(1521906599.269:19): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6421 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=40000003 syscall=240 compat=1 ip=0xf779dba9 code=0x0 audit: type=1400 audit(1521906599.609:20): avc: denied { setattr } for pid=6495 comm="syz-executor3" name="maps" dev="proc" ino=15588 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 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: undelivered death notification, 0000000000000000 binder: BINDER_SET_CONTEXT_MGR already set binder: 6547:6555 ioctl 40046207 0 returned -16 binder: 6547:6555 unknown command 536907575 binder: 6547:6557 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 6547:6555 ioctl c0306201 20008fd0 returned -22 syz-executor5 (6650): /proc/6638/oom_adj is deprecated, please use /proc/6638/oom_score_adj instead. audit: type=1400 audit(1521906600.289:21): avc: denied { ioctl } for pid=6666 comm="syz-executor5" path="socket:[15008]" dev="sockfs" ino=15008 ioctlcmd=0 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: 6869:6876 unknown command 536907575 binder: 6869:6878 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 6869:6876 ioctl c0306201 20008fd0 returned -22 binder: undelivered death notification, 0000000000000000 binder_alloc: 6954: binder_alloc_buf size -1535824229956583392 failed, no address space binder_alloc: allocated: 0 (num: 0 largest: 0), free: 8192 (num: 1 largest: 8192) binder_alloc: binder_alloc_mmap_handler: 6954 20000000-20002000 already mapped failed -16 binder: 6954:6958 transaction failed 29201/-28, size -1585311049299525632-49486819342942240 line 3128 binder: BINDER_SET_CONTEXT_MGR already set binder: 6954:6958 ioctl 40046207 0 returned -16 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65093 sclass=netlink_route_socket audit: type=1400 audit(1521906602.749:22): avc: denied { getattr } for pid=7138 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_netfilter_socket permissive=1 audit: type=1400 audit(1521906603.229:23): avc: denied { getopt } for pid=7291 comm=AC 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(1521906603.259:24): avc: denied { setopt } for pid=7291 comm=AC 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: 7291 20001000-20003000 already mapped failed -16 audit: type=1400 audit(1521906603.319:25): avc: denied { relabelto } for pid=7303 comm="syz-executor0" name="UDPv6" dev="sockfs" ino=17573 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=udp_socket permissive=1 binder: 7379:7381 transaction failed 29189/-22, size 0-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: 7379:7381 transaction failed 29189/-22, size 0-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29189