====================================================== binder: 7495:7501 unknown command -1592922878 WARNING: possible circular locking dependency detected binder: 7495:7501 ioctl c0306201 20000480 returned -22 4.14.140+ #38 Not tainted ------------------------------------------------------ syz-executor.5/7502 is trying to acquire lock: (&p->lock){+.+.}, at: [<000000007e1fb498>] seq_read+0xcd/0x1180 fs/seq_file.c:165 but task is already holding lock: (&sig->cred_guard_mutex){+.+.}, at: [<000000009330209f>] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sig->cred_guard_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 do_io_accounting+0x1da/0x790 fs/proc/base.c:2727 proc_single_show+0xf1/0x160 fs/proc/base.c:762 seq_read+0x4f7/0x1180 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:699 [inline] do_loop_readv_writev fs/read_write.c:686 [inline] do_iter_read+0x3e8/0x5b0 fs/read_write.c:923 vfs_readv+0xe6/0x150 fs/read_write.c:985 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x48a/0x870 fs/splice.c:416 do_splice_to+0xfd/0x150 fs/splice.c:880 splice_direct_to_actor+0x21a/0x760 fs/splice.c:952 do_splice_direct+0x177/0x240 fs/splice.c:1061 do_sendfile+0x493/0xb20 fs/read_write.c:1445 SYSC_sendfile64 fs/read_write.c:1506 [inline] SyS_sendfile64+0x11f/0x140 fs/read_write.c:1492 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&p->lock){+.+.}: lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 seq_read+0xcd/0x1180 fs/seq_file.c:165 __vfs_read+0xf9/0x590 fs/read_write.c:411 vfs_read+0x131/0x330 fs/read_write.c:447 kernel_read+0xa6/0x110 fs/read_write.c:426 prepare_binprm+0x5c8/0x810 fs/exec.c:1566 do_execveat_common.isra.0+0xd08/0x1bb0 fs/exec.c:1783 do_execveat fs/exec.c:1858 [inline] SYSC_execveat fs/exec.c:1939 [inline] SyS_execveat+0x49/0x60 fs/exec.c:1931 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sig->cred_guard_mutex); lock(&p->lock); lock(&sig->cred_guard_mutex); lock(&p->lock); *** DEADLOCK *** 1 lock held by syz-executor.5/7502: #0: (&sig->cred_guard_mutex){+.+.}, at: [<000000009330209f>] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389 stack backtrace: CPU: 1 PID: 7502 Comm: syz-executor.5 Not tainted 4.14.140+ #38 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2f5f/0x4320 kernel/locking/lockdep.c:3487 lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 seq_read+0xcd/0x1180 fs/seq_file.c:165 __vfs_read+0xf9/0x590 fs/read_write.c:411 vfs_read+0x131/0x330 fs/read_write.c:447 kernel_read+0xa6/0x110 fs/read_write.c:426 prepare_binprm+0x5c8/0x810 fs/exec.c:1566 do_execveat_common.isra.0+0xd08/0x1bb0 fs/exec.c:1783 do_execveat fs/exec.c:1858 [inline] SYSC_execveat fs/exec.c:1939 [inline] SyS_execveat+0x49/0x60 fs/exec.c:1931 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459879 RSP: 002b:00007f60af26cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000142 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000459879 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000001000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f60af26d6d4 R13: 00000000004bff90 R14: 00000000004d1f48 R15: 00000000ffffffff kauditd_printk_skb: 126 callbacks suppressed audit: type=1400 audit(1566876487.637:986): avc: denied { map } for pid=7517 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.637:987): avc: denied { map } for pid=7517 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.647:988): avc: denied { map } for pid=7518 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.647:989): avc: denied { map } for pid=7519 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.647:990): avc: denied { map } for pid=7520 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.647:991): avc: denied { map } for pid=7521 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.667:992): avc: denied { map } for pid=7522 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.667:993): avc: denied { map } for pid=7523 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.667:994): avc: denied { map } for pid=7524 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876487.697:995): avc: denied { map } for pid=7525 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kauditd_printk_skb: 361 callbacks suppressed audit: type=1400 audit(1566876492.687:1357): avc: denied { map } for pid=7873 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.697:1358): avc: denied { map } for pid=7873 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.777:1359): avc: denied { map } for pid=7878 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.807:1360): avc: denied { map } for pid=7878 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.867:1361): avc: denied { map } for pid=7891 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.877:1362): avc: denied { map } for pid=7891 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.877:1363): avc: denied { map } for pid=7891 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.927:1364): avc: denied { map } for pid=7894 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.937:1365): avc: denied { map } for pid=7894 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1566876492.947:1366): avc: denied { map } for pid=7897 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1