*** Guest State *** CR0: actual=0x0000000000000030, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 ====================================================== WARNING: possible circular locking dependency detected CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 4.14.180-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/2849 is trying to acquire lock: (&p->lock){+.+.}, at: [] seq_read+0xba/0x1160 fs/seq_file.c:165 but task is already holding lock: CR3 = 0x00000000fffbc000 (sb_writers#3){.+.+}, at: [] file_start_write include/linux/fs.h:2708 [inline] (sb_writers#3){.+.+}, at: [] do_sendfile+0x865/0xaf0 fs/read_write.c:1440 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 RSP = 0x0000000000000000 RIP = 0x0000000000000000 (sb_writers#3){.+.+}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x1a1/0x2e0 fs/super.c:1363 sb_start_write include/linux/fs.h:1549 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_do_remove+0x65/0xb10 fs/overlayfs/dir.c:759 vfs_rmdir fs/namei.c:3908 [inline] vfs_rmdir+0x212/0x410 fs/namei.c:3886 do_rmdir+0x2d1/0x340 fs/namei.c:3968 RFLAGS=0x002592c7 DR7 = 0x0000000000000400 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #2 (&ovl_i_mutex_dir_key[depth]){++++}: audit: type=1804 audit(1589940713.206:162): pid=2858 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/746/bus" dev="sda1" ino=16257 res=1 down_read+0x37/0xa0 kernel/locking/rwsem.c:24 inode_lock_shared include/linux/fs.h:729 [inline] do_last fs/namei.c:3333 [inline] path_openat+0x185a/0x3c50 fs/namei.c:3569 do_filp_open+0x18e/0x250 fs/namei.c:3603 do_open_execat+0xda/0x430 fs/exec.c:849 do_execveat_common.isra.0+0x694/0x1c70 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+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&sig->cred_guard_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 lock_trace+0x3f/0xc0 fs/proc/base.c:407 proc_pid_syscall+0x81/0x1f0 fs/proc/base.c:639 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 proc_single_show+0xe7/0x150 fs/proc/base.c:761 seq_read+0x4d2/0x1160 fs/seq_file.c:237 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 do_preadv+0x161/0x200 fs/read_write.c:1065 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&p->lock){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 seq_read+0xba/0x1160 fs/seq_file.c:165 proc_reg_read+0xf2/0x160 fs/proc/inode.c:217 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x41d/0x870 fs/splice.c:416 do_splice_to+0xfb/0x150 fs/splice.c:880 CS: sel=0xf000, attr=0x0009b, limit=0x0000ffff, base=0x00000000ffff0000 splice_direct_to_actor+0x20a/0x730 fs/splice.c:952 do_splice_direct+0x164/0x210 fs/splice.c:1061 do_sendfile+0x469/0xaf0 fs/read_write.c:1441 SYSC_sendfile64 fs/read_write.c:1502 [inline] SyS_sendfile64+0xff/0x110 fs/read_write.c:1488 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: &p->lock --> &ovl_i_mutex_dir_key[depth] --> sb_writers#3 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#3); lock(&ovl_i_mutex_dir_key[depth]); lock(sb_writers#3); lock(&p->lock); *** DEADLOCK *** DS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 1 lock held by syz-executor.5/2849: #0: (sb_writers#3){.+.+}, at: [] file_start_write include/linux/fs.h:2708 [inline] #0: (sb_writers#3){.+.+}, at: [] do_sendfile+0x865/0xaf0 fs/read_write.c:1440 stack backtrace: CPU: 1 PID: 2849 Comm: syz-executor.5 Not tainted 4.14.180-syzkaller #0 SS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x13e/0x194 lib/dump_stack.c:58 print_circular_bug.isra.0.cold+0x1c4/0x282 kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3491 audit: type=1804 audit(1589940713.246:163): pid=2859 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/746/bus" dev="sda1" ino=16257 res=1 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 ES: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 FS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 seq_read+0xba/0x1160 fs/seq_file.c:165 proc_reg_read+0xf2/0x160 fs/proc/inode.c:217 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 GDTR: limit=0x0000ffff, base=0x0000000000000000 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x41d/0x870 fs/splice.c:416 LDTR: sel=0x0000, attr=0x00082, limit=0x0000ffff, base=0x0000000000000000 IDTR: limit=0x0000ffff, base=0x0000000000000000 do_splice_to+0xfb/0x150 fs/splice.c:880 splice_direct_to_actor+0x20a/0x730 fs/splice.c:952 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 do_splice_direct+0x164/0x210 fs/splice.c:1061 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 do_sendfile+0x469/0xaf0 fs/read_write.c:1441 SYSC_sendfile64 fs/read_write.c:1502 [inline] SyS_sendfile64+0xff/0x110 fs/read_write.c:1488 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45ca29 RSP: 002b:00007f7bff22cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00000000004fc540 RCX: 000000000045ca29 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 R10: 4000000000010046 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000008dc R14: 00000000004cba16 R15: 00007f7bff22d6d4 new mount options do not match the existing superblock, will be ignored netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop2): VFS: Can't find ext4 filesystem *** Host State *** audit: type=1804 audit(1589940714.076:164): pid=2859 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/746/bus" dev="sda1" ino=16257 res=1 RIP = 0xffffffff8117dbcf RSP = 0xffff88808cdbf9b0 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f68fdbfc700 GSBase=ffff8880aea00000 TRBase=fffffe0000003000 GDTBase=fffffe0000001000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=0000000093434000 CR4=00000000001426f0 Sysenter RSP=fffffe0000002200 CS:RIP=0010:ffffffff866018a0 EFER = 0x0000000000000d01 PAT = 0x0407050600070106 new mount options do not match the existing superblock, will be ignored *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000e2 XFS (loop4): stripe width (4) must be a multiple of the stripe unit (6) EntryControls=0000d1ff ExitControls=002fefff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 EXT4-fs (loop2): VFS: Can't find ext4 filesystem VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000002 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 XFS (loop4): stripe width (4) must be a multiple of the stripe unit (6) TSC Offset = 0xfffffbe732b220d0 EPT pointer = 0x000000008820401e Virtual processor ID = 0x0006 audit: type=1804 audit(1589940714.456:165): pid=2918 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/747/bus" dev="sda1" ino=16185 res=1 uinput: write device info first audit: type=1804 audit(1589940714.506:166): pid=2923 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/747/bus" dev="sda1" ino=16185 res=1 *** Guest State *** XFS (loop4): stripe width (4) must be a multiple of the stripe unit (6) CR0: actual=0x0000000000000030, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x0000000000000000 RFLAGS=0x002592c7 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 EXT4-fs (loop2): VFS: Can't find ext4 filesystem CS: sel=0xf000, attr=0x0009b, limit=0x0000ffff, base=0x00000000ffff0000 DS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 SS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 ES: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 FS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GDTR: limit=0x0000ffff, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x00082, limit=0x0000ffff, base=0x0000000000000000 XFS (loop4): stripe width (4) must be a multiple of the stripe unit (6) IDTR: limit=0x0000ffff, base=0x0000000000000000 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 audit: type=1804 audit(1589940714.866:167): pid=2922 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir443691103/syzkaller.OI9owC/687/bus" dev="sda1" ino=16160 res=1 *** Host State *** RIP = 0xffffffff8117dbcf RSP = 0xffff8881eef379b0 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f68fdbfc700 GSBase=ffff8880aea00000 TRBase=fffffe0000003000 GDTBase=fffffe0000001000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=0000000046877000 CR4=00000000001426f0 Sysenter RSP=fffffe0000002200 CS:RIP=0010:ffffffff866018a0 EFER = 0x0000000000000d01 PAT = 0x0407050600070106 *** Control State *** netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000e2 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. EntryControls=0000d1ff ExitControls=002fefff netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000002 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xfffffbe65c8c2650 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. EPT pointer = 0x000000005553201e audit: type=1804 audit(1589940715.306:168): pid=2978 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/748/bus" dev="sda1" ino=16324 res=1 Virtual processor ID = 0x0004 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1804 audit(1589940715.356:169): pid=2979 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/748/bus" dev="sda1" ino=16324 res=1 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. uinput: write device info first *** Guest State *** CR0: actual=0x0000000000000030, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 audit: type=1804 audit(1589940715.746:170): pid=2925 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir443691103/syzkaller.OI9owC/687/bus" dev="sda1" ino=16160 res=1 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x0000000000000000 RFLAGS=0x002592c7 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 CS: sel=0xf000, attr=0x0009b, limit=0x0000ffff, base=0x00000000ffff0000 DS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 SS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 ES: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 FS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 audit: type=1804 audit(1589940716.226:171): pid=3040 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/749/bus" dev="sda1" ino=16324 res=1 GDTR: limit=0x0000ffff, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x00082, limit=0x0000ffff, base=0x0000000000000000 IDTR: limit=0x0000ffff, base=0x0000000000000000 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff8117dbcf RSP = 0xffff8881feee79b0 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f68fdbfc700 GSBase=ffff8880aeb00000 TRBase=fffffe0000034000 GDTBase=fffffe0000032000 IDTBase=fffffe0000000000 ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' CR0=0000000080050033 CR3=00000001dd4af000 CR4=00000000001426e0 Sysenter RSP=fffffe0000033200 CS:RIP=0010:ffffffff866018a0 ieee80211 phy13: hwaddr 02:00:00:00:0d:00 registered EFER = 0x0000000000000d01 PAT = 0x0407050600070106 *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000e2 EntryControls=0000d1ff ExitControls=002fefff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 ieee80211 phy14: Selected rate control algorithm 'minstrel_ht' VMExit: intr_info=00000000 errcode=00000000 ilen=00000003 reason=80000021 qualification=0000000000000000 ieee80211 phy14: hwaddr 02:00:00:00:0e:00 registered IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xfffffbe5d518d02c EPT pointer = 0x0000000089ab801e Virtual processor ID = 0x0004 uinput: write device info first ieee80211 phy15: Selected rate control algorithm 'minstrel_ht' uinput: write device info first ieee80211 phy15: hwaddr 02:00:00:00:0f:00 registered uinput: write device info first ieee80211 phy16: Selected rate control algorithm 'minstrel_ht' ieee80211 phy16: hwaddr 02:00:00:00:10:00 registered ieee80211 phy17: Selected rate control algorithm 'minstrel_ht' ieee80211 phy17: hwaddr 02:00:00:00:11:00 registered uinput: write device info first kauditd_printk_skb: 6 callbacks suppressed audit: type=1804 audit(1589940718.406:178): pid=3253 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/751/bus" dev="sda1" ino=16160 res=1 ieee80211 phy18: Selected rate control algorithm 'minstrel_ht' uinput: write device info first ieee80211 phy18: hwaddr 02:00:00:00:12:00 registered ieee80211 phy19: Selected rate control algorithm 'minstrel_ht' uinput: write device info first ieee80211 phy19: hwaddr 02:00:00:00:13:00 registered uinput: write device info first ieee80211 phy20: Selected rate control algorithm 'minstrel_ht' ieee80211 phy20: hwaddr 02:00:00:00:14:00 registered audit: type=1804 audit(1589940719.496:179): pid=3332 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir809710130/syzkaller.kuI2Gs/752/bus" dev="sda1" ino=16185 res=1