syzbot


panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry

Status: fixed on 2023/02/10 02:24
Fix commit: 8373fb5db8c8 Check hard link target's mount compatibility before kernfs.Dentry cast.
First crash: 660d, last: 657d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry (2) C 13 655d 655d 18/26 fixed on 2023/02/11 13:12

Sample crash report:
panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry

goroutine 228 [running]:
panic({0x31ee20, 0xc0006289c0})
	GOROOT/src/runtime/panic.go:987 +0x3ba fp=0xc000774ea8 sp=0xc000774de8 pc=0x118d8fa
runtime.panicdottypeE(...)
	GOROOT/src/runtime/iface.go:262
runtime.panicdottypeI(0xc0005e29f8?, 0x473a40, 0x36c180)
	GOROOT/src/runtime/iface.go:272 +0x7c fp=0xc000774ed0 sp=0xc000774ea8 pc=0x1160ddc
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).LinkAt(0xc000002fa0, {0x750ef8, 0xc000547500}, 0xc00024d200, {0xc000239180?, 0xc000a981e0?})
	pkg/sentry/fsimpl/kernfs/filesystem.go:367 +0xce5 fp=0xc000775178 sp=0xc000774ed0 pc=0x17c96c5
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*filesystem).LinkAt(0xc000002fa0, {0x750ef8, 0xc000547500}, 0x1c8a9a7?, {0xc000239180?, 0xc000a981e0?})
	<autogenerated>:1 +0x8a fp=0xc0007751e0 sp=0xc000775178 pc=0x1dfca0a
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).LinkAt(0xc000547500?, {0x750ef8, 0xc000547500}, 0xc0005e2990?, 0xc0004d2b00?, 0xc000775490)
	pkg/sentry/vfs/vfs.go:296 +0x402 fp=0xc000775298 sp=0xc0007751e0 pc=0x1717b42
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.linkat(0xc000547500, 0x11c7ab7?, 0x265f8e4?, 0x1?, 0x11c65ec?, 0x1400)
	pkg/sentry/syscalls/linux/sys_file.go:1029 +0x4aa fp=0xc000775540 sp=0xc000775298 pc=0x1caa94a
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Linkat(0x0?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f4580884e78}})
	pkg/sentry/syscalls/linux/sys_file.go:998 +0xf1 fp=0xc0007755c0 sp=0xc000775540 pc=0x1caa451
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000547500, 0x109, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f4580884e78}})
	pkg/sentry/kernel/task_syscall.go:142 +0xab8 fp=0xc0007759d8 sp=0xc0007755c0 pc=0x1a971d8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000547500, 0x1?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f4580884e78}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e fp=0xc000775a78 sp=0xc0007759d8 pc=0x1a9932e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0000285a0?, 0x115cb9d?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f4580884e78}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5 fp=0xc000775af0 sp=0xc000775a78 pc=0x1a98c05
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000547500)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b fp=0xc000775c18 sp=0xc000775af0 pc=0x1a986fb
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000547500?, 0xc000547500)
	pkg/sentry/kernel/task_run.go:259 +0x2094 fp=0xc000775ec0 sp=0xc000775c18 pc=0x1a81534
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000547500, 0xe)
	pkg/sentry/kernel/task_run.go:94 +0x2cc fp=0xc000775fb0 sp=0xc000775ec0 pc=0x1a7eacc
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:377 +0x48 fp=0xc000775fe0 sp=0xc000775fb0 pc=0x1a948c8
runtime.goexit()
	src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000775fe8 sp=0xc000775fe0 pc=0x11c4981
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:377 +0x1da

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/08 07:56 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-3-race-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:53 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-3-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:49 gvisor 1da6444d05e9 15c3d445 console log report syz C ci-gvisor-kvm panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:47 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-kvm-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:46 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-2-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:46 gvisor 1da6444d05e9 15c3d445 console log report syz C ci-gvisor-ptrace-2 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:46 gvisor 1da6444d05e9 15c3d445 console log report syz C ci-gvisor-ptrace-1 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:43 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-1-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:43 gvisor 1da6444d05e9 15c3d445 console log report syz C ci-gvisor-ptrace-3 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:43 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-2-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:43 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-1-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:33 gvisor 1da6444d05e9 15c3d445 .config console log report syz C ci-gvisor-ptrace-3-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/08 07:22 gvisor 1da6444d05e9 15c3d445 .config console log report info ci-gvisor-ptrace-3-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/05 04:45 gvisor 5c2bc3b3f8fe be607b78 .config console log report info ci-gvisor-arm64-ptrace-1-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
* Struck through repros no longer work on HEAD.