binder: 9923:9941 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 9923:9941 ioctl 40046207 0 returned -16 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.141+ #1 Not tainted ------------------------------------------------------- syz-executor.1/9956 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: -> #2 (&p->lock){+.+.+.}: 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 -> #1 (&pipe->mutex/1){+.+.+.}: 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 -> #0 (&sig->cred_guard_mutex){+.+.+.}: 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 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 do_preadv+0x197/0x240 fs/read_write.c:974 SYSC_preadv fs/read_write.c:1024 [inline] SyS_preadv+0x30/0x40 fs/read_write.c:1019 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: &sig->cred_guard_mutex --> &pipe->mutex/1 --> &p->lock 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.1/9956: #0: (&p->lock){+.+.+.}, at: [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 stack backtrace: CPU: 1 PID: 9956 Comm: syz-executor.1 Not tainted 4.9.141+ #1 ffff8801d2e8f528 ffffffff81b42e79 ffffffff83ca9d80 ffffffff83ca4fe0 ffffffff83ca2fd0 ffff8801c69e88d0 ffff8801c69e8000 ffff8801d2e8f570 ffffffff813fee40 0000000000000001 00000000c69e88b0 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 [] 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 [] do_preadv+0x197/0x240 fs/read_write.c:974 [] SYSC_preadv fs/read_write.c:1024 [inline] [] SyS_preadv+0x30/0x40 fs/read_write.c:1019 [] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb binder: BINDER_SET_CONTEXT_MGR already set binder: 9903:9921 ioctl 40046207 0 returned -16 nla_parse: 2 callbacks suppressed netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. audit: type=1400 audit(1574495440.591:91): avc: denied { setattr } for pid=9986 comm="syz-executor.4" name="ns" dev="proc" ino=37391 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 selinux_nlmsg_perm: 2885 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=45570 sclass=netlink_route_socket pig=9997 comm=syz-executor.4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=45570 sclass=netlink_route_socket pig=10000 comm=syz-executor.4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=12152 sclass=netlink_route_socket pig=9996 comm=syz-executor.2 netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.3'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=12152 sclass=netlink_route_socket pig=10015 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10033 comm=syz-executor.3 audit: type=1400 audit(1574495443.731:92): avc: denied { getopt } for pid=10116 comm="syz-executor.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_generic_socket permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder: 10128:10147 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10128:10129 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10180:10182 ioctl 40046207 0 returned -16 audit: type=1400 audit(1574495444.861:93): avc: denied { create } for pid=10220 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(1574495444.881:94): avc: denied { bind } for pid=10220 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(1574495444.901:95): avc: denied { name_bind } for pid=10220 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(1574495444.931:96): avc: denied { connect } for pid=10220 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(1574495444.931:97): avc: denied { write } for pid=10220 comm="syz-executor.1" lport=59196 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(1574495445.001:98): avc: denied { node_bind } for pid=10220 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(1574495445.061:99): avc: denied { create } for pid=10220 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(1574495445.091:100): avc: denied { ioctl } for pid=10220 comm="syz-executor.1" path="socket:[37755]" dev="sockfs" ino=37755 ioctlcmd=0x8914 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(1574495445.131:101): avc: denied { ioctl } for pid=10220 comm="syz-executor.1" path="socket:[38376]" dev="sockfs" ino=38376 ioctlcmd=0x8914 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: release 10259:10265 transaction 383 out, still active binder: BINDER_SET_CONTEXT_MGR already set binder: 10269:10269 ioctl 40046207 0 returned -16 binder: unexpected work type, 4, not freed binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: BINDER_SET_CONTEXT_MGR already set binder: 10259:10265 ioctl 40046207 0 returned -16 binder_alloc: 10259: binder_alloc_buf, no vma binder: 10259:10265 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 383, target dead audit: type=1400 audit(1574495446.321:102): avc: denied { ioctl } for pid=10240 comm="syz-executor.2" path="socket:[38948]" dev="sockfs" ino=38948 ioctlcmd=0x7438 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: BINDER_SET_CONTEXT_MGR already set binder: 10307:10308 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10307:10308 ioctl 40046207 0 returned -16 binder_alloc: 10307: binder_alloc_buf, no vma binder: 10307:10308 transaction failed 29189/-3, size 88-24 line 3136 selinux_nlmsg_perm: 4248 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10302 comm=syz-executor.1 binder: BINDER_SET_CONTEXT_MGR already set binder: 10327:10328 ioctl 40046207 0 returned -16 binder_alloc: 3538: binder_alloc_buf, no vma binder: 10327:10328 transaction failed 29189/-3, size 120-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10307:10318 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10353:10355 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10353:10355 ioctl 40046207 0 returned -16 binder_alloc: 10353: binder_alloc_buf, no vma binder: 10353:10355 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10369:10373 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10369:10373 ioctl 40046207 0 returned -16 binder_alloc: 10369: binder_alloc_buf, no vma binder: 10369:10373 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10385:10387 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10385:10387 ioctl 40046207 0 returned -16 binder_alloc: 10385: binder_alloc_buf, no vma binder: 10385:10387 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10410:10412 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10410:10412 ioctl 40046207 0 returned -16 binder_alloc: 10410: binder_alloc_buf, no vma binder: 10410:10412 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 Dead loop on virtual device ip6_vti0, fix it urgently! binder: BINDER_SET_CONTEXT_MGR already set binder: 10433:10436 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10433:10436 ioctl 40046207 0 returned -16 binder_alloc: 10433: binder_alloc_buf, no vma binder: 10433:10436 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10447:10454 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10447:10454 ioctl 40046207 0 returned -16 binder_alloc: 10447: binder_alloc_buf, no vma binder: 10447:10454 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 10468:10470 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10468:10470 ioctl 40046207 0 returned -16 binder_alloc: 10468: binder_alloc_buf, no vma binder: 10468:10470 transaction failed 29189/-3, size 88-24 line 3136 binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: BINDER_SET_CONTEXT_MGR already set binder: 10491:10495 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10491:10495 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10501:10502 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10501:10502 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10506:10510 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10506:10510 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10515:10516 ioctl 40046207 0 returned -16 binder: 10489:10493 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10489:10507 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10489:10517 ioctl 40046207 0 returned -16