====================================================== [ INFO: possible circular locking dependency detected ] 4.9.141+ #1 Not tainted ------------------------------------------------------- syz-executor.2/4561 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.+.}, at: [] do_io_accounting+0x1fb/0x7e0 fs/proc/base.c:2690 but task is already holding lock: (&p->lock){+.+.+.}, at: [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x900 kernel/locking/mutex.c:621 seq_read+0xdd/0x12d0 fs/seq_file.c:178 proc_reg_read+0xfd/0x180 fs/proc/inode.c:203 do_loop_readv_writev.part.1+0xd5/0x280 fs/read_write.c:718 do_loop_readv_writev fs/read_write.c:707 [inline] do_readv_writev+0x56e/0x7b0 fs/read_write.c:873 vfs_readv+0x84/0xc0 fs/read_write.c:897 kernel_readv fs/splice.c:363 [inline] default_file_splice_read+0x451/0x7f0 fs/splice.c:435 do_splice_to+0x10c/0x170 fs/splice.c:899 do_splice fs/splice.c:1192 [inline] SYSC_splice fs/splice.c:1416 [inline] SyS_splice+0x10d2/0x14d0 fs/splice.c:1399 do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x900 kernel/locking/mutex.c:621 __pipe_lock fs/pipe.c:87 [inline] fifo_open+0x15c/0x9e0 fs/pipe.c:921 do_dentry_open+0x3ef/0xc90 fs/open.c:766 vfs_open+0x11c/0x210 fs/open.c:879 do_last fs/namei.c:3410 [inline] path_openat+0x542/0x2790 fs/namei.c:3534 do_filp_open+0x197/0x270 fs/namei.c:3568 do_open_execat+0x10f/0x640 fs/exec.c:844 do_execveat_common.isra.14+0x687/0x1ed0 fs/exec.c:1723 do_execve fs/exec.c:1829 [inline] SYSC_execve fs/exec.c:1910 [inline] SyS_execve+0x42/0x50 fs/exec.c:1905 do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x3189/0x4a10 kernel/locking/lockdep.c:3345 lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_killable_nested+0xcc/0x9f0 kernel/locking/mutex.c:641 do_io_accounting+0x1fb/0x7e0 fs/proc/base.c:2690 proc_tgid_io_accounting+0x22/0x30 fs/proc/base.c:2739 proc_single_show+0xfd/0x170 fs/proc/base.c:785 seq_read+0x4b6/0x12d0 fs/seq_file.c:240 __vfs_read+0x115/0x560 fs/read_write.c:449 vfs_read+0x124/0x390 fs/read_write.c:472 SYSC_pread64 fs/read_write.c:626 [inline] SyS_pread64+0x145/0x170 fs/read_write.c:613 do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(&pipe->mutex/1); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 1 lock held by syz-executor.2/4561: #0: (&p->lock){+.+.+.}, at: [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 stack backtrace: CPU: 0 PID: 4561 Comm: syz-executor.2 Not tainted 4.9.141+ #1 ffff8801c9c27648 ffffffff81b42e79 ffffffff83ca9d80 ffffffff83ca4920 ffffffff83ca2fd0 ffff88019c01d010 ffff88019c01c740 ffff8801c9c27690 ffffffff813fee40 0000000000000001 000000009c01cff0 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug.cold.36+0x2f7/0x432 kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x3189/0x4a10 kernel/locking/lockdep.c:3345 [] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_killable_nested+0xcc/0x9f0 kernel/locking/mutex.c:641 [] do_io_accounting+0x1fb/0x7e0 fs/proc/base.c:2690 [] proc_tgid_io_accounting+0x22/0x30 fs/proc/base.c:2739 [] proc_single_show+0xfd/0x170 fs/proc/base.c:785 [] seq_read+0x4b6/0x12d0 fs/seq_file.c:240 [] __vfs_read+0x115/0x560 fs/read_write.c:449 [] vfs_read+0x124/0x390 fs/read_write.c:472 [] SYSC_pread64 fs/read_write.c:626 [inline] [] SyS_pread64+0x145/0x170 fs/read_write.c:613 [] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb audit: type=1400 audit(1574051759.734:39): avc: denied { create } for pid=4576 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=rawip_socket permissive=1 audit: type=1400 audit(1574051759.754:40): avc: denied { bind } for pid=4576 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=rawip_socket permissive=1 binder: 4593:4595 ioctl c018620c 20000040 returned -22 audit: type=1400 audit(1574051759.804:41): avc: denied { connect } for pid=4576 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=rawip_socket permissive=1 audit: type=1400 audit(1574051759.804:42): avc: denied { write } for pid=4576 comm="syz-executor.1" laddr=::ffff:127.0.0.1 lport=49157 faddr=::ffff:127.0.0.1 fport=20004 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=rawip_socket permissive=1 audit: type=1400 audit(1574051759.844:43): avc: denied { transfer } for pid=4598 comm="syz-executor.4" 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: 4598:4602 got reply transaction with bad transaction stack, transaction 18 has target 4598:0 binder: 4598:4602 transaction failed 29201/-71, size 0-0 line 2936 binder: release 4598:4602 transaction 18 out, still active binder: send failed reply for transaction 18, target dead binder: 4605:4606 got reply transaction with bad transaction stack, transaction 23 has target 4605:0 binder: 4605:4606 transaction failed 29201/-71, size 0-0 line 2936 binder: release 4605:4606 transaction 23 out, still active binder: send failed reply for transaction 23, target dead binder: 4613:4615 got reply transaction with bad transaction stack, transaction 28 has target 4613:0 binder: 4613:4615 transaction failed 29201/-71, size 0-0 line 2936 binder: release 4613:4615 transaction 28 out, still active binder: send failed reply for transaction 28, target dead audit: type=1400 audit(1574051760.314:44): avc: denied { name_bind } for pid=4576 comm="syz-executor.1" src=20004 scontext=system_u:object_r:semanage_trans_lock_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=rawip_socket permissive=1 audit: type=1400 audit(1574051760.334:45): avc: denied { node_bind } for pid=4576 comm="syz-executor.1" src=20004 scontext=system_u:object_r:semanage_trans_lock_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=rawip_socket permissive=1 audit: type=1400 audit(1574051760.534:46): avc: denied { create } for pid=4576 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=tcp_socket permissive=1 audit: type=1400 audit(1574051760.554:47): avc: denied { bind } for pid=4576 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:semanage_trans_lock_t:s0 tclass=tcp_socket permissive=1 binder: 4640:4645 got reply transaction with bad transaction stack, transaction 33 has target 4640:0 binder: 4640:4645 transaction failed 29201/-71, size 0-0 line 2936 binder: release 4640:4645 transaction 33 out, still active binder: send failed reply for transaction 33, target dead binder: release 4660:4663 transaction 38 out, still active binder: unexpected work type, 4, not freed binder: BINDER_SET_CONTEXT_MGR already set binder: 4676:4682 ioctl 40046207 0 returned -16 binder_alloc: 4660: binder_alloc_buf, no vma binder: 4676:4682 transaction failed 29189/-3, size 88-24 line 3136 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=47707 sclass=netlink_route_socket pig=4683 comm=syz-executor.5 binder: BINDER_SET_CONTEXT_MGR already set binder: 4689:4691 ioctl 40046207 0 returned -16 binder_alloc: 4660: binder_alloc_buf, no vma binder: 4689:4691 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 38, target dead binder: undelivered TRANSACTION_ERROR: 29189 binder: release 4703:4705 transaction 44 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 44, target dead binder: release 4715:4716 transaction 48 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 48, target dead binder: release 4723:4725 transaction 52 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 52, target dead SELinux: unrecognized netlink message: protocol=0 nlmsg_type=47707 sclass=netlink_route_socket pig=4683 comm=syz-executor.5 binder: release 4738:4740 transaction 56 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 56, target dead binder: release 4742:4744 transaction 60 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 60, target dead binder: release 4749:4753 transaction 64 out, still active SELinux: unrecognized netlink message: protocol=0 nlmsg_type=5 sclass=netlink_route_socket pig=4761 comm=syz-executor.1 binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 64, target dead SELinux: unrecognized netlink message: protocol=0 nlmsg_type=5 sclass=netlink_route_socket pig=4777 comm=syz-executor.1 binder: release 4764:4770 transaction 68 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 68, target dead binder: release 4797:4800 transaction 72 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 72, target dead binder: release 4809:4811 transaction 76 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE input: syz1 as /devices/virtual/input/input14 binder: BINDER_SET_CONTEXT_MGR already set binder: 4815:4821 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4815:4821 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4823:4826 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4823:4826 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4829:4832 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4829:4832 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4835:4837 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4835:4837 transaction failed 29189/-3, size 88-24 line 3136 uinput: write device info first binder: BINDER_SET_CONTEXT_MGR already set binder: 4843:4845 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4843:4845 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4862:4866 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4862:4866 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4869:4871 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4869:4871 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4874:4878 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4874:4878 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4882:4884 ioctl 40046207 0 returned -16 syz-executor.1 uses obsolete (PF_INET,SOCK_PACKET) binder_alloc: 4809: binder_alloc_buf, no vma binder: 4882:4884 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 4896:4901 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4896:4901 transaction failed 29189/-3, size 88-24 line 3136 binder: BINDER_SET_CONTEXT_MGR already set binder: 4906:4909 ioctl 40046207 0 returned -16 binder_alloc: 4809: binder_alloc_buf, no vma binder: 4906:4909 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 76, target dead SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=4898 comm=syz-executor.5 binder: release 4919:4923 transaction 91 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 91, target dead binder: 4962:4966 transaction failed 29189/-22, size 88-24 line 3013 binder: undelivered TRANSACTION_ERROR: 29189 binder: 4984:4987 transaction failed 29189/-22, size 88-24 line 3013 binder: undelivered TRANSACTION_ERROR: 29189 binder: 4996:4997 got transaction to invalid handle binder: 4998:5002 transaction failed 29189/-22, size 88-24 line 3013 binder: 4996:4997 transaction failed 29201/-22, size 80-24 line 3013 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189