syzbot


DATA RACE in vfs.(*VirtualFilesystem).PivotRoot

Status: fixed on 2023/03/08 20:46
Fix commit: 807fd0fd27d0 Lock around accessing the mount namespace in pivot_root.
First crash: 638d, last: 638d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0029ab1b8 by goroutine 10734:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).PivotRoot()
      pkg/sentry/vfs/mount.go:957 +0x75d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.PivotRoot()
      pkg/sentry/syscalls/linux/sys_file.go:435 +0x6dd
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0xab6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x8d
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0xc4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x53a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:265 +0x22b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x2cb
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:377 +0x47

Previous write at 0x00c0029ab1b8 by goroutine 10723:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).connectLocked()
      pkg/sentry/vfs/mount.go:640 +0x1a4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).PivotRoot()
      pkg/sentry/vfs/mount.go:990 +0xa1a
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.PivotRoot()
      pkg/sentry/syscalls/linux/sys_file.go:435 +0x6dd
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0xab6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x8d
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0xc4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x53a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:265 +0x22b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x2cb
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:377 +0x47

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/27 11:39 gvisor 8184fa1db0fa 9189cb53 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in vfs.(*VirtualFilesystem).PivotRoot
* Struck through repros no longer work on HEAD.