syzbot


DATA RACE in vfs.(*VirtualFilesystem).setPropagation

Status: fixed on 2022/11/11 04:35
Fix commit: 20ef2127a102 Lock around optional tag generation.
First crash: 759d, last: 759d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c000f5ca70 by goroutine 168:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).setPropagation()
      pkg/sentry/vfs/mount.go:227 +0x24a
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).umountRecursiveLocked()
      pkg/sentry/vfs/mount.go:760 +0x390
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).umountAtRecursiveLocked()
      pkg/sentry/vfs/mount.go:693 +0xdd
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).UmountAt()
      pkg/sentry/vfs/mount.go:666 +0x6fb
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Umount2()
      pkg/sentry/syscalls/linux/vfs2/mount.go:171 +0x3d9
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0x9b7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x7c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0x8e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x495
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:253 +0x18f8
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x353
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:380 +0x47

Previous read at 0x00c000f5ca70 by goroutine 189:
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).GenerateProcMountInfo()
      pkg/sentry/vfs/mount.go:1389 +0xabc
  gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*mountInfoData).Generate()
      pkg/sentry/fsimpl/proc/task_files.go:1125 +0x228
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).preadLocked()
      pkg/sentry/vfs/file_description_impl_util.go:311 +0x154
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).PRead()
      pkg/sentry/vfs/file_description_impl_util.go:330 +0xcf
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).PRead()
      pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:127 +0xae
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PRead()
      pkg/sentry/vfs/file_description.go:628 +0x189
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.pread()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:251 +0xac
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Preadv()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:199 +0x2cf
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0x9b7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x7c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0x8e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x495
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:253 +0x18f8
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x353
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:380 +0x47

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/29 01:58 gvisor 6b3b5493d0ea bc17b3a4 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in vfs.(*VirtualFilesystem).setPropagation
2022/10/29 01:36 gvisor 6b3b5493d0ea bc17b3a4 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in vfs.(*VirtualFilesystem).setPropagation
2022/10/28 22:28 gvisor 6b3b5493d0ea bc17b3a4 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in vfs.(*VirtualFilesystem).setPropagation
* Struck through repros no longer work on HEAD.