netlink: 28 bytes leftover after parsing attributes in process `syz-executor2'. ====================================================== [ INFO: possible circular locking dependency detected ] 4.4.118-g5f7f76a #24 Not tainted ------------------------------------------------------- syz-executor5/27160 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-executor5/27160: #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: 27160 Comm: syz-executor5 Not tainted 4.4.118-g5f7f76a #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 96a45754f20410ec ffff8800bac079b8 ffffffff81d0402d ffffffff851a0010 ffffffff851a0010 ffffffff851beb20 ffff8800a74950f8 ffff8800a7494800 ffff8800bac07a00 ffffffff81233ba1 ffff8800a74950f8 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 netlink: 28 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor1'. audit: type=1401 audit(1519669800.804:72): op=setxattr invalid_context=040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000audit: type=1401 audit(1519669800.924:73): op=setxattr invalid_context=040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[ 137.594552] audit: type=1400 audit(1519669801.244:74): avc: denied { create } for pid=27772 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_rdma_socket permissive=1 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 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket binder: 28050:28056 ioctl 4010640d 20000000 returned -22 binder: 28050:28056 ioctl 4010640d 20000000 returned -22 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket binder: 28267:28269 ioctl 8915 200000c0 returned -22 binder: 28267:28269 ioctl 8915 200000c0 returned -22 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket audit: type=1400 audit(1519669803.034:75): avc: denied { ioctl } for pid=28375 comm="syz-executor5" path="socket:[61495]" dev="sockfs" ino=61495 ioctlcmd=2409 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: unrecognized netlink message: protocol=0 nlmsg_type=771 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=771 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=771 sclass=netlink_route_socket binder: 28897:28903 ioctl 5473 20000040 returned -22 binder: 28897:28912 ioctl 5473 20000040 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 29029:29038 ioctl 40046207 0 returned -16 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=770 sclass=netlink_route_socket IPVS: Scheduler module ip_vs_m`x.JݼބDBC+h.f not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+]} not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+*87Q3dC not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+D c_1F not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+P\F not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+`X 07я not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+ bx not found audit: type=1400 audit(1519669806.234:76): avc: denied { write } for pid=29626 comm="syz-executor5" path="socket:[64737]" dev="sockfs" ino=64737 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 IPVS: Scheduler module ip_vs_m`x.JݼބDBC+& not found binder_alloc: binder_alloc_mmap_handler: 29648 2011a000-2051a000 already mapped failed -16 IPVS: Scheduler module ip_vs_m`x.JݼބDBC+y ~p not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+! PN,' not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+I/! not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+=Gfe{=o not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+8EO$ not found binder: 29961:29963 ioctl c0bc5351 20000000 returned -22 binder: 29961:29963 ioctl c0bc5351 20000000 returned -22 audit: type=1400 audit(1519669807.344:77): avc: denied { connect } for pid=30005 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 binder: 30044:30049 IncRefs 0 refcount change on invalid ref 4 ret -22 binder: 30044:30049 ERROR: BC_REGISTER_LOOPER called without request binder: 30044:30049 IncRefs 0 refcount change on invalid ref 1 ret -22 binder: 30044:30049 Release 1 refcount change on invalid ref 2 ret -22 binder: 30044:30049 Release 1 refcount change on invalid ref 256 ret -22 binder: 30044:30064 IncRefs 0 refcount change on invalid ref 4 ret -22 binder: 30044:30064 ERROR: BC_REGISTER_LOOPER called without request binder: 30044:30064 IncRefs 0 refcount change on invalid ref 1 ret -22 binder: 30044:30064 Release 1 refcount change on invalid ref 2 ret -22 binder: 30044:30064 Release 1 refcount change on invalid ref 256 ret -22 binder: 30044:30064 got reply transaction with no transaction stack binder: 30044:30064 transaction failed 29201/-71, size 56-56 line 2921 binder: 30044:30049 got reply transaction with no transaction stack binder: 30044:30049 transaction failed 29201/-71, size 56-56 line 2921 binder: 30119:30123 ioctl 4b65 10000 returned -22 binder: 30119:30145 ioctl 4b65 10000 returned -22 binder: 30231:30235 BC_REQUEST_DEATH_NOTIFICATION invalid ref 2 binder: 30231:30235 BC_DEAD_BINDER_DONE 0000000000000002 not found binder: 30231:30235 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 30231:30255 BC_REQUEST_DEATH_NOTIFICATION invalid ref 2 binder: 30231:30235 BC_FREE_BUFFER uae59c43f52453e23 no match binder: 30231:30255 BC_DEAD_BINDER_DONE 0000000000000002 not found binder: 30231:30255 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 30231:30255 BC_FREE_BUFFER uae59c43f52453e23 no match binder_alloc: binder_alloc_mmap_handler: 30324 2011a000-2051a000 already mapped failed -16 IPVS: Scheduler module ip_vs_m`x.JݼބDBC+FiA not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+[[ s$ not found binder: BINDER_SET_CONTEXT_MGR already set binder: 30363:30367 ioctl 40046207 0 returned -16 IPVS: Scheduler module ip_vs_m`x.JݼބDBC+җ not found binder_alloc: binder_alloc_mmap_handler: 30413 2011a000-2051a000 already mapped failed -16 audit: type=1400 audit(1519669808.604:78): avc: denied { getopt } for pid=30440 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 IPVS: Scheduler module ip_vs_m`x.JݼބDBC+CSWiN not found IPVS: Scheduler module ip_vs_m`x.JݼބDBC+CH# not found binder: 30481:30487 ioctl 541b 200000c0 returned -22