syzbot


DATA RACE in tmpfs.GetSeals

Status: fixed on 2022/11/16 03:57
Fix commit: 374e716c7ce2 AddSeals has to take the write lock to modify seals
First crash: 744d, last: 744d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c002833040 by goroutine 393:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.GetSeals()
      pkg/sentry/fsimpl/tmpfs/regular_file.go:769 +0x18d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Fcntl()
      pkg/sentry/syscalls/linux/vfs2/fd.go:265 +0x1308
  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:378 +0x47

Previous write at 0x00c002833040 by goroutine 451:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.AddSeals()
      pkg/sentry/fsimpl/tmpfs/regular_file.go:797 +0x30f
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Fcntl()
      pkg/sentry/syscalls/linux/vfs2/fd.go:271 +0x13b2
  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:378 +0x47

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/12 16:23 gvisor 4b63ff222d43 f42ee5d8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in tmpfs.GetSeals
* Struck through repros no longer work on HEAD.