====================================================== WARNING: possible circular locking dependency detected 4.14.76+ #19 Not tainted ------------------------------------------------------ syz-executor0/10895 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.}, at: [] do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 but task is already holding lock: (&p->lock){+.+.}, at: [] seq_read+0xd4/0x11d0 fs/seq_file.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&p->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 seq_read+0xd4/0x11d0 fs/seq_file.c:165 proc_reg_read+0xef/0x170 fs/proc/inode.c:217 do_loop_readv_writev fs/read_write.c:698 [inline] do_iter_read+0x3cc/0x580 fs/read_write.c:922 vfs_readv+0xe6/0x150 fs/read_write.c:984 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x495/0x860 fs/splice.c:416 do_splice_to+0x102/0x150 fs/splice.c:880 do_splice fs/splice.c:1173 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xf4d/0x12a0 fs/splice.c:1382 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&pipe->mutex/1){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 __pipe_lock fs/pipe.c:88 [inline] fifo_open+0x156/0x9d0 fs/pipe.c:921 do_dentry_open+0x426/0xda0 fs/open.c:764 vfs_open+0x11c/0x210 fs/open.c:878 do_last fs/namei.c:3408 [inline] path_openat+0x4eb/0x23a0 fs/namei.c:3550 do_filp_open+0x197/0x270 fs/namei.c:3584 do_open_execat+0x10d/0x5b0 fs/exec.c:849 do_execveat_common.isra.14+0x6cb/0x1d60 fs/exec.c:1740 do_execve fs/exec.c:1847 [inline] SYSC_execve fs/exec.c:1928 [inline] SyS_execve+0x34/0x40 fs/exec.c:1923 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&sig->cred_guard_mutex){+.+.}: lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 proc_single_show+0xf1/0x160 fs/proc/base.c:762 seq_read+0x4e0/0x11d0 fs/seq_file.c:237 __vfs_read+0xf4/0x5b0 fs/read_write.c:411 vfs_read+0x11e/0x330 fs/read_write.c:447 SYSC_pread64 fs/read_write.c:615 [inline] SyS_pread64+0x136/0x160 fs/read_write.c:602 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 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-executor0/10895: #0: (&p->lock){+.+.}, at: [] seq_read+0xd4/0x11d0 fs/seq_file.c:165 stack backtrace: CPU: 1 PID: 10895 Comm: syz-executor0 Not tainted 4.14.76+ #19 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_circular_bug.isra.18.cold.43+0x2d3/0x40c 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+0x2ff9/0x4320 kernel/locking/lockdep.c:3487 lock_acquire+0x10f/0x380 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf5/0x1480 kernel/locking/mutex.c:893 do_io_accounting+0x1d7/0x770 fs/proc/base.c:2731 proc_single_show+0xf1/0x160 fs/proc/base.c:762 seq_read+0x4e0/0x11d0 fs/seq_file.c:237 __vfs_read+0xf4/0x5b0 fs/read_write.c:411 vfs_read+0x11e/0x330 fs/read_write.c:447 SYSC_pread64 fs/read_write.c:615 [inline] SyS_pread64+0x136/0x160 fs/read_write.c:602 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007f04c63cfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f04c63d06d4 R13: 00000000004c3080 R14: 00000000004d4a28 R15: 00000000ffffffff audit: type=1400 audit(1539609049.551:221): avc: denied { map } for pid=10879 comm="syz-executor2" path="socket:[25780]" dev="sockfs" ino=25780 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=udp_socket permissive=1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10929 comm=syz-executor5 netlink: 20 bytes leftover after parsing attributes in process `syz-executor5'. audit: type=1400 audit(1539609050.491:222): avc: denied { block_suspend } for pid=10985 comm="syz-executor4" capability=36 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=capability2 permissive=1 netlink: 60 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 60 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1400 audit(1539609051.701:223): avc: denied { relabelto } for pid=11129 comm="syz-executor3" name="file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1539609051.811:224): avc: denied { validate_trans } for pid=11129 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:security_t:s0 tclass=security permissive=1 audit: type=1400 audit(1539609051.851:225): avc: denied { relabelfrom } for pid=11129 comm="syz-executor3" name="file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1539609051.941:226): avc: denied { getattr } for pid=1848 comm="syz-executor3" path="/root/syzkaller-testdir331370890/syzkaller.8MyOMj/186/file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1539609051.941:227): avc: denied { read } for pid=1848 comm="syz-executor3" name="file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1539609051.941:228): avc: denied { open } for pid=1848 comm="syz-executor3" path="/root/syzkaller-testdir331370890/syzkaller.8MyOMj/186/file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1539609051.941:229): avc: denied { rmdir } for pid=1848 comm="syz-executor3" name="file0" dev="sda1" ino=16599 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:netcontrol_device_t:s0 tclass=dir permissive=1 binder: 11149:11158 ioctl 1276 0 returned -22 binder: 11156:11159 ioctl c018620c 20000380 returned -1 binder: 11156:11165 ioctl c018620c 20000380 returned -1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: policydb magic number 0xf974ff8c does not match expected magic number 0xf97cff8c SELinux: failed to load policy binder: 11149:11180 ioctl 1276 0 returned -22 netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: policydb magic number 0xf974ff8c does not match expected magic number 0xf97cff8c SELinux: failed to load policy input: syz1 as /devices/virtual/input/input17 input: syz1 as /devices/virtual/input/input18 binder: 11276:11284 ERROR: BC_REGISTER_LOOPER called without request binder: 11276:11340 ERROR: BC_REGISTER_LOOPER called without request audit: type=1326 audit(1539609055.451:230): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11446 comm="syz-executor0" exe="/root/syz-executor0" sig=9 arch=c000003e syscall=228 compat=0 ip=0x45a3ca code=0x0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=27664 sclass=netlink_xfrm_socket pig=11476 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=27664 sclass=netlink_xfrm_socket pig=11476 comm=syz-executor5 audit: type=1326 audit(1539609056.251:231): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11446 comm="syz-executor0" exe="/root/syz-executor0" sig=9 arch=c000003e syscall=228 compat=0 ip=0x45a3ca code=0x0 audit: type=1400 audit(1539609056.371:232): avc: denied { create } for pid=11533 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_connector_socket permissive=1 audit: type=1400 audit(1539609056.711:233): avc: denied { setopt } for pid=11583 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_netfilter_socket permissive=1 audit: type=1400 audit(1539609057.331:234): avc: denied { associate } for pid=11602 comm="syz-executor0" name="rtc0" dev="devtmpfs" ino=1077 scontext=system_u:object_r:systemd_tmpfiles_exec_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=filesystem permissive=1 binder: 11606:11612 got transaction with invalid offsets size, 18 binder: 11606:11612 transaction failed 29201/-22, size 0-18 line 3171 binder_alloc: binder_alloc_mmap_handler: 11606 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 11606:11612 ioctl 40046207 0 returned -16 binder_alloc: 11606: binder_alloc_buf, no vma binder: 11606:11613 transaction failed 29189/-3, size 0-18 line 3135 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11622:11623 got transaction with invalid offsets size, 18 binder: 11622:11623 transaction failed 29201/-22, size 0-18 line 3171 binder: undelivered TRANSACTION_ERROR: 29201 binder: 11629:11630 got transaction with invalid offsets size, 18 binder: 11629:11630 transaction failed 29201/-22, size 0-18 line 3171 binder: undelivered TRANSACTION_ERROR: 29201 binder: 11640:11643 got transaction with invalid offsets size, 18 binder: 11640:11643 transaction failed 29201/-22, size 0-18 line 3171 binder: undelivered TRANSACTION_ERROR: 29201 binder: 11651:11653 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11656:11657 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11670:11673 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 11700: binder_alloc_buf, no vma binder: 11700:11703 transaction failed 29189/-3, size 0-18 line 3135 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 11712: binder_alloc_buf, no vma binder: 11712:11715 transaction failed 29189/-3, size 0-18 line 3135 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 11729: binder_alloc_buf, no vma device Y4`Ҙ left promiscuous mode binder: 11729:11731 transaction failed 29189/-3, size 0-18 line 3135 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11747:11751 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11763:11765 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11780:11786 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 binder: 11798:11803 transaction failed 29189/-22, size 0-18 line 3012 binder: undelivered TRANSACTION_ERROR: 29189 raw_sendmsg: syz-executor0 forgot to set AF_INET. Fix it!