syzbot


panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:

Status: fixed on 2021/02/10 20:40
Fix commit: 09afd6832689 [vfs] Handle `.` and `..` as last path component names in kernfs Rename.
First crash: 1395d, last: 1385d

Sample crash report:
panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:0 sema:0}}} dead:false mounts:0 impl:0xc0001f21b0} refs:7 fs:0xc0004ec460 flags:1 parent:<nil> name: cached:false dentryEntry:{next:<nil> prev:<nil>} dirMu:{m:{Mutex:{state:0 sema:0}}} children:map[bus:0xc0001f2240] inode:0xc00030bc00} disappeared inside atomic section?

goroutine 491 [running]:
panic(0x16e60e0, 0xc0001fa0f0)
	GOROOT/src/runtime/panic.go:1064 +0x470 fp=0xc000345000 sp=0xc000344f48 pc=0x439130
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).RenameAt(0xc0004ec460, 0x1aa2280, 0xc0001f0a80, 0xc0004f8900, 0xc0002d2f60, 0xc0001f21b0, 0xc00000b202, 0x3, 0x0, 0x0, ...)
	pkg/sentry/fsimpl/kernfs/filesystem.go:681 +0x1130 fp=0xc000345370 sp=0xc000345000 pc=0xb698b0
gvisor.dev/gvisor/pkg/sentry/fsimpl/sys.(*filesystem).RenameAt(0xc0004ec460, 0x1aa2280, 0xc0001f0a80, 0xc0004f8900, 0xc0002d2f60, 0xc0001f21b0, 0xc00000b202, 0x3, 0x0, 0x0, ...)
	<autogenerated>:1 +0xbe fp=0xc0003453e8 sp=0xc000345370 pc=0x11e651e
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).RenameAt(0xc0002b3588, 0x1aa2280, 0xc0001f0a80, 0xc0005da060, 0xc000345620, 0xc000345670, 0xc000345558, 0xc0004908a0, 0xc00058c800)
	pkg/sentry/vfs/vfs.go:530 +0x392 fp=0xc0003454c0 sp=0xc0003453e8 pc=0xa1a4b2
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.renameat(0xc0001f0a80, 0xc0ffffff9c, 0x20000080, 0xc0ffffff9c, 0x20000040, 0x0, 0x0, 0x0)
	pkg/sentry/syscalls/linux/vfs2/filesystem.go:242 +0x38b fp=0xc0003456d0 sp=0xc0003454c0 pc=0x12f294b
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Rename(0xc0001f0a80, 0x20000080, 0x20000040, 0x2e, 0x0, 0x0, 0x0, 0xc000047000, 0xc0003457a8, 0x4435bc, ...)
	pkg/sentry/syscalls/linux/vfs2/filesystem.go:198 +0x69 fp=0xc000345730 sp=0xc0003456d0 pc=0x12f2389
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc0001f0a80, 0x52, 0x20000080, 0x20000040, 0x2e, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/kernel/task_syscall.go:104 +0x453 fp=0xc0003459d0 sp=0xc000345730 pc=0xd640f3
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc0001f0a80, 0x52, 0x20000080, 0x20000040, 0x2e, 0x0, 0x0, 0x0, 0x408638, 0xc0001f135f)
	pkg/sentry/kernel/task_syscall.go:239 +0xba fp=0xc000345ab0 sp=0xc0003459d0 pc=0xd6587a
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0001f0a80, 0x52, 0x20000080, 0x20000040, 0x2e, 0x0, 0x0, 0x0, 0x13793cb, 0x2d23d54)
	pkg/sentry/kernel/task_syscall.go:199 +0x10f fp=0xc000345b60 sp=0xc000345ab0 pc=0xd6518f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc0001f0a80, 0x2, 0xc0001f0a80)
	pkg/sentry/kernel/task_syscall.go:174 +0x1ea fp=0xc000345ca0 sp=0xc000345b60 pc=0xd6492a
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc0001f0a80, 0x1a729c0, 0x0)
	pkg/sentry/kernel/task_run.go:282 +0x12a7 fp=0xc000345ed8 sp=0xc000345ca0 pc=0xd50327
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc0001f0a80, 0xa)
	pkg/sentry/kernel/task_run.go:97 +0x398 fp=0xc000345fd0 sp=0xc000345ed8 pc=0xd4e458
runtime.goexit()
	src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000345fd8 sp=0xc000345fd0 pc=0x474681
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:323 +0x1a5

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/31 14:49 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-2-race panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 14:29 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-1-race panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 13:47 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-3-race panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 13:30 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-kvm panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 13:14 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-2 panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 13:01 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-2-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 12:50 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-3-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 12:50 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-1-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 12:45 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-ptrace-3 panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 12:30 gvisor 8dda226542d7 fc9fd31e .config console log report syz C ci-gvisor-kvm-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/02/10 04:12 gvisor aae4803808dc 2bd9619f .config console log report info ci-gvisor-kvm-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 21:04 gvisor daeb06d2cbf5 fc9fd31e .config console log report info ci-gvisor-kvm-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
2021/01/31 11:53 gvisor 8dda226542d7 fc9fd31e .config console log report info ci-gvisor-kvm-cover panic: Child "." for parent Dentry &{vfsd:{mu:{m:{Mutex:{state:LINE sema:LINE}}} dead:false mounts:LINE impl:ADDR} refs:
* Struck through repros no longer work on HEAD.