====================================================== WARNING: possible circular locking dependency detected 4.19.112-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/20441 is trying to acquire lock: 00000000416746e5 (&sig->cred_guard_mutex){+.+.}, at: lock_trace+0x45/0xe0 fs/proc/base.c:402 but task is already holding lock: 000000008669dda2 (&p->lock){+.+.}, at: seq_read+0x6b/0x10f0 fs/seq_file.c:161 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&p->lock){+.+.}: seq_read+0x6b/0x10f0 fs/seq_file.c:161 do_loop_readv_writev fs/read_write.c:701 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_read+0x46b/0x640 fs/read_write.c:925 vfs_readv+0xf0/0x160 fs/read_write.c:987 kernel_readv fs/splice.c:362 [inline] default_file_splice_read+0x478/0x970 fs/splice.c:417 do_splice_to+0x10e/0x160 fs/splice.c:881 splice_direct_to_actor+0x2b9/0x8d0 fs/splice.c:959 do_splice_direct+0x1a8/0x270 fs/splice.c:1068 do_sendfile+0x549/0xc10 fs/read_write.c:1447 __do_sys_sendfile64 fs/read_write.c:1508 [inline] __se_sys_sendfile64 fs/read_write.c:1494 [inline] __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1494 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (sb_writers#4){.+.+}: sb_start_write include/linux/fs.h:1578 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_create_object+0x96/0x290 fs/overlayfs/dir.c:600 lookup_open+0x11f6/0x19b0 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0x13cb/0x4200 fs/namei.c:3537 do_filp_open+0x1a1/0x280 fs/namei.c:3567 do_sys_open+0x3c0/0x500 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&ovl_i_mutex_dir_key[depth]){++++}: inode_lock_shared include/linux/fs.h:757 [inline] do_last fs/namei.c:3326 [inline] path_openat+0x1d18/0x4200 fs/namei.c:3537 do_filp_open+0x1a1/0x280 fs/namei.c:3567 do_open_execat+0x124/0x5b0 fs/exec.c:853 __do_execve_file.isra.0+0x1577/0x2110 fs/exec.c:1755 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8a/0xb0 fs/exec.c:1959 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sig->cred_guard_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 lock_trace+0x45/0xe0 fs/proc/base.c:402 proc_pid_personality+0x17/0xc0 fs/proc/base.c:2926 proc_single_show+0xeb/0x170 fs/proc/base.c:755 seq_read+0x4b9/0x10f0 fs/seq_file.c:229 do_loop_readv_writev fs/read_write.c:701 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_read+0x46b/0x640 fs/read_write.c:925 vfs_readv+0xf0/0x160 fs/read_write.c:987 do_preadv+0x1b6/0x270 fs/read_write.c:1071 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &sig->cred_guard_mutex --> sb_writers#4 --> &p->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(sb_writers#4); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 1 lock held by syz-executor.0/20441: #0: 000000008669dda2 (&p->lock){+.+.}, at: seq_read+0x6b/0x10f0 fs/seq_file.c:161 stack backtrace: CPU: 1 PID: 20441 Comm: syz-executor.0 Not tainted 4.19.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_circular_bug.isra.0.cold+0x1c4/0x282 kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1861 [inline] check_prevs_add kernel/locking/lockdep.c:1974 [inline] validate_chain kernel/locking/lockdep.c:2415 [inline] __lock_acquire+0x2e19/0x49c0 kernel/locking/lockdep.c:3411 lock_acquire+0x170/0x400 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 lock_trace+0x45/0xe0 fs/proc/base.c:402 proc_pid_personality+0x17/0xc0 fs/proc/base.c:2926 proc_single_show+0xeb/0x170 fs/proc/base.c:755 seq_read+0x4b9/0x10f0 fs/seq_file.c:229 do_loop_readv_writev fs/read_write.c:701 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_read+0x46b/0x640 fs/read_write.c:925 vfs_readv+0xf0/0x160 fs/read_write.c:987 do_preadv+0x1b6/0x270 fs/read_write.c:1071 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c849 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f472a982c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007f472a9836d4 RCX: 000000000045c849 RDX: 0000000000000001 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 000000000076c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000856 R14: 00000000004cb170 R15: 000000000076c04c nla_parse: 10 callbacks suppressed netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. syz-executor.5 invoked oom-killer: gfp_mask=0x7080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), nodemask=(null), order=0, oom_score_adj=1000 set_target_v3_checkentry: 20 callbacks suppressed Cannot find add_set index 0 as target syz-executor.5 cpuset=syz5 mems_allowed=0-1 Cannot find add_set index 0 as target CPU: 1 PID: 20520 Comm: syz-executor.5 Not tainted 4.19.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 dump_header+0x159/0xa5e mm/oom_kill.c:441 oom_kill_process.cold+0x10/0x6dc mm/oom_kill.c:954 out_of_memory mm/oom_kill.c:1130 [inline] out_of_memory+0x349/0x1250 mm/oom_kill.c:1062 mem_cgroup_out_of_memory+0x1c7/0x240 mm/memcontrol.c:1418 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. mem_cgroup_oom mm/memcontrol.c:1744 [inline] try_charge+0xe22/0x1300 mm/memcontrol.c:2315 memcg_kmem_charge_memcg+0x7b/0x150 mm/memcontrol.c:2645 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. memcg_kmem_charge+0x132/0x360 mm/memcontrol.c:2688 __alloc_pages_nodemask+0x396/0x6a0 mm/page_alloc.c:4421 alloc_pages_current+0xff/0x200 mm/mempolicy.c:2197 alloc_pages include/linux/gfp.h:532 [inline] pmd_alloc_one arch/x86/include/asm/pgalloc.h:102 [inline] __pmd_alloc+0x37/0x440 mm/memory.c:4283 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. pmd_alloc include/linux/mm.h:1835 [inline] __handle_mm_fault+0x1827/0x3b60 mm/memory.c:4132 handle_mm_fault+0x1a5/0x670 mm/memory.c:4202 __do_page_fault+0x5ed/0xdd0 arch/x86/mm/fault.c:1390 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1204 RIP: 0033:0x403667 Code: 00 00 00 48 83 ec 08 48 8b 15 35 f0 87 00 48 8b 05 26 f0 87 00 48 39 d0 48 8d 8a 00 00 00 01 72 17 48 39 c8 73 12 48 8d 50 04 <89> 38 48 89 15 08 f0 87 00 48 83 c4 08 c3 48 89 c6 bf c0 f9 4c 00 RSP: 002b:00007ffe34df3650 EFLAGS: 00010287 RAX: 0000001b2ee20000 RBX: 0000000000000000 RCX: 0000001b2fe20000 RDX: 0000001b2ee20004 RSI: 00007ffe34df3410 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000004 R10: 0000000000000075 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe34df3840 R14: 0000000000000000 R15: 00007ffe34df3850 Task in /syz5 killed as a result of limit of /syz5 memory: usage 307136kB, limit 307200kB, failcnt 983 memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0 kmem: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz5: cache:56KB rss:262648KB rss_huge:243712KB shmem:52KB mapped_file:0KB dirty:0KB writeback:0KB swap:0KB inactive_anon:0KB active_anon:262600KB inactive_file:0KB active_file:4KB unevictable:0KB Memory cgroup out of memory: Kill process 12325 (syz-executor.5) score 1113 or sacrifice child Killed process 12325 (syz-executor.5) total-vm:74832kB, anon-rss:2208kB, file-rss:35788kB, shmem-rss:0kB Cannot find add_set index 0 as target Cannot find add_set index 0 as target NOHZ: local_softirq_pending 08 Cannot find add_set index 0 as target netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. Cannot find add_set index 0 as target netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. Cannot find add_set index 0 as target netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. Cannot find add_set index 0 as target nla_parse: 2 callbacks suppressed netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. Cannot find add_set index 0 as target syz-executor.5 invoked oom-killer: gfp_mask=0x7080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), nodemask=(null), order=3, oom_score_adj=1000 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. syz-executor.5 cpuset=syz5 mems_allowed=0-1 CPU: 0 PID: 20632 Comm: syz-executor.5 Not tainted 4.19.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 dump_header+0x159/0xa5e mm/oom_kill.c:441 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. oom_kill_process.cold+0x10/0x6dc mm/oom_kill.c:954 out_of_memory mm/oom_kill.c:1130 [inline] out_of_memory+0x349/0x1250 mm/oom_kill.c:1062 mem_cgroup_out_of_memory+0x1c7/0x240 mm/memcontrol.c:1418 mem_cgroup_oom mm/memcontrol.c:1744 [inline] try_charge+0xe22/0x1300 mm/memcontrol.c:2315 memcg_kmem_charge_memcg+0x7b/0x150 mm/memcontrol.c:2645 memcg_kmem_charge+0x132/0x360 mm/memcontrol.c:2688 __alloc_pages_nodemask+0x396/0x6a0 mm/page_alloc.c:4421 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] alloc_pages_node include/linux/gfp.h:523 [inline] alloc_thread_stack_node kernel/fork.c:240 [inline] dup_task_struct kernel/fork.c:811 [inline] copy_process.part.0+0x3d6/0x7a60 kernel/fork.c:1737 copy_process kernel/fork.c:1694 [inline] _do_fork+0x22f/0xf40 kernel/fork.c:2207 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45f219 Code: ff 48 85 f6 0f 84 d7 8c fb ff 48 83 ee 10 48 89 4e 08 48 89 3e 48 89 d7 4c 89 c2 4d 89 c8 4c 8b 54 24 08 b8 38 00 00 00 0f 05 <48> 85 c0 0f 8c ae 8c fb ff 74 01 c3 31 ed 48 f7 c7 00 00 01 00 75 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. RSP: 002b:00007ffe34df3528 EFLAGS: 00000202 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fe679fcd700 RCX: 000000000045f219 RDX: 00007fe679fcd9d0 RSI: 00007fe679fccdb0 RDI: 00000000003d0f00 netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. RBP: 00007ffe34df3740 R08: 00007fe679fcd700 R09: 00007fe679fcd700 R10: 00007fe679fcd9d0 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffe34df35df R14: 00007fe679fcd9c0 R15: 000000000076bfac Task in /syz5 killed as a result of limit of /syz5 memory: usage 307168kB, limit 307200kB, failcnt 1016 memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0 kmem: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz5: cache:56KB rss:262624KB rss_huge:243712KB shmem:52KB mapped_file:0KB dirty:0KB writeback:0KB swap:0KB inactive_anon:0KB active_anon:262672KB inactive_file:0KB active_file:0KB unevictable:0KB netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 14 bytes leftover after parsing attributes in process `syz-executor.4'. Memory cgroup out of memory: Kill process 12336 (syz-executor.5) score 1113 or sacrifice child Killed process 12336 (syz-executor.5) total-vm:74832kB, anon-rss:2208kB, file-rss:35788kB, shmem-rss:0kB syz-executor.5 invoked oom-killer: gfp_mask=0x7080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), nodemask=(null), order=3, oom_score_adj=1000 syz-executor.5 cpuset=syz5 mems_allowed=0-1 CPU: 1 PID: 20633 Comm: syz-executor.5 Not tainted 4.19.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 dump_header+0x159/0xa5e mm/oom_kill.c:441 oom_kill_process.cold+0x10/0x6dc mm/oom_kill.c:954 out_of_memory mm/oom_kill.c:1130 [inline] out_of_memory+0x349/0x1250 mm/oom_kill.c:1062 mem_cgroup_out_of_memory+0x1c7/0x240 mm/memcontrol.c:1418 mem_cgroup_oom mm/memcontrol.c:1744 [inline] try_charge+0xbdf/0x1300 mm/memcontrol.c:2315 memcg_kmem_charge_memcg+0x7b/0x150 mm/memcontrol.c:2645 memcg_kmem_charge+0x132/0x360 mm/memcontrol.c:2688 __alloc_pages_nodemask+0x396/0x6a0 mm/page_alloc.c:4421 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] alloc_pages_node include/linux/gfp.h:523 [inline] alloc_thread_stack_node kernel/fork.c:240 [inline] dup_task_struct kernel/fork.c:811 [inline] copy_process.part.0+0x3d6/0x7a60 kernel/fork.c:1737 copy_process kernel/fork.c:1694 [inline] _do_fork+0x22f/0xf40 kernel/fork.c:2207 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c849 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe679fedc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fe679fee6d4 RCX: 000000000045c849 RDX: 9999999999999999 RSI: 0000000000000000 RDI: 2000000002000100 RBP: 000000000076bf00 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000074 R14: 00000000004c3103 R15: 000000000076bf0c Task in /syz5 killed as a result of limit of /syz5 memory: usage 304900kB, limit 307200kB, failcnt 1016 memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0 kmem: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz5: cache:56KB rss:260464KB rss_huge:241664KB shmem:52KB mapped_file:0KB dirty:0KB writeback:0KB swap:0KB inactive_anon:0KB active_anon:260508KB inactive_file:0KB active_file:0KB unevictable:0KB Memory cgroup out of memory: Kill process 12358 (syz-executor.5) score 1113 or sacrifice child Killed process 12358 (syz-executor.5) total-vm:74832kB, anon-rss:2208kB, file-rss:35788kB, shmem-rss:0kB oom_reaper: reaped process 12358 (syz-executor.5), now anon-rss:0kB, file-rss:34828kB, shmem-rss:0kB