====================================================== [ INFO: possible circular locking dependency detected ] 4.4.120-gd63fdf6 #28 Not tainted ------------------------------------------------------- syz-executor7/5808 is trying to acquire lock: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 but task is already holding lock: netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. (ashmem_mutex){+.+.+.}, at: [] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:330 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 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_to_user arch/x86/include/asm/uaccess.h:760 [inline] [] filldir+0x162/0x2d0 fs/readdir.c:180 [] dir_emit_dot include/linux/fs.h:3070 [inline] [] dir_emit_dots include/linux/fs.h:3081 [inline] [] dcache_readdir+0x11e/0x7b0 fs/libfs.c:150 [] iterate_dir+0x1c8/0x420 fs/readdir.c:42 [] SYSC_getdents fs/readdir.c:215 [inline] [] SyS_getdents+0x14a/0x270 fs/readdir.c:196 [] 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 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 [] vfs_llseek+0xa2/0xd0 fs/read_write.c:260 [] ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:342 [] vfs_llseek fs/read_write.c:260 [inline] [] SYSC_lseek fs/read_write.c:285 [inline] [] SyS_lseek+0xeb/0x170 fs/read_write.c:276 [] entry_SYSCALL_64_fastpath+0x1c/0x98 other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 1 lock held by syz-executor7/5808: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:330 stack backtrace: CPU: 0 PID: 5808 Comm: syz-executor7 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 753f0ef86898d0d8 ffff8801d8f17ad8 ffffffff81d0408d ffffffff851a0010 ffffffff851a9d00 ffffffff851be970 ffff8800bb8038f8 ffff8800bb803000 ffff8801d8f17b20 ffffffff81233ba1 ffff8800bb8038f8 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 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] shmem_file_llseek+0xf1/0x240 mm/shmem.c:1816 [] vfs_llseek+0xa2/0xd0 fs/read_write.c:260 [] ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:342 [] vfs_llseek fs/read_write.c:260 [inline] [] SYSC_lseek fs/read_write.c:285 [inline] [] SyS_lseek+0xeb/0x170 fs/read_write.c:276 [] entry_SYSCALL_64_fastpath+0x1c/0x98 device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) audit: type=1400 audit(1521500795.361:13): avc: denied { create } for pid=5892 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 binder: BINDER_SET_CONTEXT_MGR already set binder: 5882:5908 ioctl 40046207 0 returned -16 binder_alloc: 5882: binder_alloc_buf, no vma binder: 5882:5908 transaction failed 29189/-3, size 0-0 line 3128 binder: release 5882:5908 transaction 11 out, still active binder: send failed reply for transaction 11, target dead tmpfs: No value for mount option 'cQ|^[ |э}#;n2y.`<mgbȢ̰\vs#F}R K,1(r;w!8A l90Px/H:ːx;O' tmpfs: No value for mount option 'cQ|^[ |э}#;n2y.`<mgbȢ̰\vs#F}R K,1(r;w!8A l90Px/H:ːx;O' binder: 6060:6066 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: tried to use weak ref as strong ref binder: 6060:6066 Release 1 refcount change on invalid ref 0 ret -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 6060:6066 ioctl 40046207 0 returned -16 binder: 6060:6066 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: tried to use weak ref as strong ref binder: 6060:6093 Release 1 refcount change on invalid ref 0 ret -22 l2tp_core: tunl 1: fd 19 wrong protocol, got 1, expected 17 l2tp_core: tunl 1: fd 20 wrong protocol, got 1, expected 17 netlink: 180 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 180 bytes leftover after parsing attributes in process `syz-executor4'. binder: BINDER_SET_CONTEXT_MGR already set binder: 6234:6235 ioctl 40046207 0 returned -16 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=30919 sclass=netlink_route_socket audit_printk_skb: 6 callbacks suppressed audit: type=1400 audit(1521500797.091:16): avc: denied { ioctl } for pid=6463 comm="syz-executor4" path="socket:[14959]" dev="sockfs" ino=14959 ioctlcmd=8914 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 l2tp_core: tunl 1: fd 19 wrong protocol, got 1, expected 17 l2tp_core: tunl 1: fd 21 wrong protocol, got 1, expected 17 binder: 6447:6464 tried to acquire reference to desc 0, got 1 instead keychord: invalid keycode count 0 keychord: invalid keycode count 0 netlink: 64 bytes leftover after parsing attributes in process `syz-executor0'. tc_ctl_action: received NO action attribs sg_write: data in/out 524252/1 bytes for SCSI command 0xe9-- guessing data in; program syz-executor7 not setting count and/or reply_len properly IPv4: Oversized IP packet from 127.0.0.1 l2tp_core: tunl 2: fd 21 wrong protocol, got 6, expected 17 l2tp_core: tunl 2: fd 25 wrong protocol, got 6, expected 17 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=48795 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=48795 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=10691 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=10691 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=10691 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=10691 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=10691 sclass=netlink_route_socket netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. binder: 7577:7588 ioctl c0306201 20008000 returned -14 binder_alloc: binder_alloc_mmap_handler: 7577 20001000-20005000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 7577:7598 ioctl c0306201 20008000 returned -14 binder: 7577:7588 ioctl 40046207 0 returned -16 IPVS: set_ctl: invalid protocol: 13703 39.52.93.236:60696 Ɓtpm`x/.HݼބDBC+f`[k$ audit: type=1400 audit(1521500801.321:17): avc: denied { write } for pid=7661 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_generic_socket permissive=1 netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. binder: 7895:7897 ioctl c0306201 2000ffd0 returned -11 binder: 7895:7897 BC_FREE_BUFFER u000000002000c000 no match binder: BINDER_SET_CONTEXT_MGR already set binder: 7895:7909 ioctl 40046207 0 returned -16 binder: 7895:7897 ioctl c0306201 2000ffd0 returned -11 netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. binder: 8016:8018 ioctl 40bc5311 20000140 returned -22 audit: type=1400 audit(1521500802.311:18): avc: denied { transfer } for pid=8016 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=binder permissive=1 binder: release 8016:8018 transaction 24 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: BINDER_SET_CONTEXT_MGR already set binder: 8016:8018 ioctl 40046207 0 returned -16 binder: 8016:8037 ioctl 40bc5311 20000140 returned -22 binder_alloc: 8016: binder_alloc_buf, no vma binder: 8016:8039 transaction failed 29189/-3, size 40-8 line 3128 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 24, target dead device syz_tun entered promiscuous mode device syz_tun left promiscuous mode binder: 8167:8169 ioctl c0306201 20008fd0 returned -14 binder: 8167:8179 ioctl c0306201 20008fd0 returned -14 audit: type=1401 audit(1521500802.941:19): op=setxattr invalid_context="*vmnet1" audit: type=1400 audit(1521500803.011:20): avc: denied { accept } for pid=8265 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=netlink_netfilter_socket permissive=1 binder: 8316:8324 ioctl c0306201 20004000 returned -14 binder: 8316:8335 ioctl c0306201 20004000 returned -14 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 device bridge0 entered promiscuous mode device bridge0 entered promiscuous mode