syzbot


DATA RACE in vfs.(*VirtualFilesystem).connectLocked (2)

Status: fixed on 2023/10/05 23:05
Fix commit: de5271b36007 Fix small data race in mount.
First crash: 431d, last: 430d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c003c09938 by goroutine 1702814:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).connectLocked()
      pkg/sentry/vfs/mount.go:619 +0x1a4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).PivotRoot()
      pkg/sentry/vfs/mount.go:950 +0xbd1
  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 +0xabe
  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:269 +0x22b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:98 +0x35a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:395 +0x47

Previous read at 0x00c003c09938 by goroutine 1702808:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).ConnectMountAt()
      pkg/sentry/vfs/mount.go:226 +0x10c
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt()
      pkg/sentry/vfs/mount.go:422 +0x1bc
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Mount()
      pkg/sentry/syscalls/linux/sys_mount.go:127 +0xbac
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0xabe
  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:269 +0x22b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:98 +0x35a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:395 +0x47

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/22 19:41 gvisor 19250b87ede7 0b6a67ac .config console log report info ci-gvisor-ptrace-1-race-cover DATA RACE in vfs.(*VirtualFilesystem).connectLocked
2023/09/22 07:57 gvisor 05b7c55c1320 0b6a67ac .config console log report info ci-gvisor-ptrace-1-race-cover DATA RACE in vfs.(*VirtualFilesystem).connectLocked
* Struck through repros no longer work on HEAD.