syzbot


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

Status: fixed on 2023/02/11 13:12
Fix commit: 1beb3e2b251d Check hard link target's mount compatibility before kernfs.Dentry cast. Again.
First crash: 655d, last: 655d
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 C 14 657d 660d 18/26 fixed on 2023/02/10 02:24

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

goroutine 275 [running]:
panic({0x31f3e0, 0xc000873aa0})
	GOROOT/src/runtime/panic.go:987 +0x3ba fp=0xc0002dcea8 sp=0xc0002dcde8 pc=0x118f03a
runtime.panicdottypeE(...)
	GOROOT/src/runtime/iface.go:262
runtime.panicdottypeI(0xc0004fc728?, 0x474280, 0x36c7e0)
	GOROOT/src/runtime/iface.go:272 +0x7c fp=0xc0002dced0 sp=0xc0002dcea8 pc=0x116251c
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).LinkAt(0xc000032f00, {0x751938, 0xc0006d8000}, 0xc00072c480, {0xc00020a100?, 0xc00075c140?})
	pkg/sentry/fsimpl/kernfs/filesystem.go:367 +0xce5 fp=0xc0002dd178 sp=0xc0002dced0 pc=0x17cae45
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*filesystem).LinkAt(0xc000032f00, {0x751938, 0xc0006d8000}, 0x1c8d487?, {0xc00020a100?, 0xc00075c140?})
	<autogenerated>:1 +0x8a fp=0xc0002dd1e0 sp=0xc0002dd178 pc=0x1dff3aa
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).LinkAt(0xc0006d8000?, {0x751938, 0xc0006d8000}, 0xc0004fc6c0?, 0xc0006b6800?, 0xc0002dd490)
	pkg/sentry/vfs/vfs.go:296 +0x402 fp=0xc0002dd298 sp=0xc0002dd1e0 pc=0x17192c2
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.linkat(0xc0006d8000, 0x11c91f7?, 0x265f2e4?, 0x1?, 0x11c7d2c?, 0x1400)
	pkg/sentry/syscalls/linux/sys_file.go:1029 +0x4aa fp=0xc0002dd540 sp=0xc0002dd298 pc=0x1cad42a
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Linkat(0x0?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f979d985e78}})
	pkg/sentry/syscalls/linux/sys_file.go:998 +0xf1 fp=0xc0002dd5c0 sp=0xc0002dd540 pc=0x1cacf31
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc0006d8000, 0x109, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f979d985e78}})
	pkg/sentry/kernel/task_syscall.go:142 +0xab8 fp=0xc0002dd9d8 sp=0xc0002dd5c0 pc=0x1a98eb8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc0006d8000, 0x1?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f979d985e78}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e fp=0xc0002dda78 sp=0xc0002dd9d8 pc=0x1a9b00e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0006461e0?, 0x115e2dd?, {{0x4}, {0x20000100}, {0x3}, {0x200000c0}, {0x1400}, {0x7f979d985e78}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5 fp=0xc0002ddaf0 sp=0xc0002dda78 pc=0x1a9a8e5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc0006d8000)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b fp=0xc0002ddc18 sp=0xc0002ddaf0 pc=0x1a9a3db
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc0006d8000?, 0xc0006d8000)
	pkg/sentry/kernel/task_run.go:259 +0x2094 fp=0xc0002ddec0 sp=0xc0002ddc18 pc=0x1a83214
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc0006d8000, 0xe)
	pkg/sentry/kernel/task_run.go:94 +0x2cc fp=0xc0002ddfb0 sp=0xc0002ddec0 pc=0x1a807ac
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:377 +0x48 fp=0xc0002ddfe0 sp=0xc0002ddfb0 pc=0x1a965a8
runtime.goexit()
	src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0002ddfe8 sp=0xc0002ddfe0 pc=0x11c60c1
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:377 +0x1da

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/10 06:46 gvisor 13448f9e8761 07980f9d .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/10 06:28 gvisor 13448f9e8761 07980f9d console log report syz C ci-gvisor-kvm panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:06 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-3-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:06 gvisor 13448f9e8761 07980f9d console log report syz C ci-gvisor-ptrace-2 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:04 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-kvm-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:03 gvisor 13448f9e8761 07980f9d console log report syz C ci-gvisor-ptrace-1 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:03 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-1-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:03 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-3-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 06:00 gvisor 13448f9e8761 07980f9d console log report syz C ci-gvisor-ptrace-3 panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 05:58 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-1-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 05:57 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-2-race panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 05:40 gvisor 13448f9e8761 07980f9d .config console log report syz C ci-gvisor-ptrace-2-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
2023/02/10 05:31 gvisor 13448f9e8761 07980f9d .config console log report info ci-gvisor-ptrace-2-cover panic: interface conversion: vfs.DentryImpl is *vfs.anonDentry, not *kernfs.Dentry
* Struck through repros no longer work on HEAD.