syzbot


DATA RACE in kernel.(*FSContext).SetWorkingDirectory

Status: fixed on 2018/06/27 00:32
Fix commit: 4ac79312b093 Don't read cwd or root without holding mu
First crash: 2348d, last: 2348d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c420593030 by goroutine 278:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*FSContext).SetWorkingDirectory()
      pkg/sentry/kernel/fs_context.go:123 +0xd7
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Chdir.func1()
      pkg/sentry/syscalls/linux/sys_file.go:650 +0x1a5
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpOn()
      pkg/sentry/syscalls/linux/sys_file.go:111 +0x235
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Chdir()
      pkg/sentry/syscalls/linux/sys_file.go:639 +0x147
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:162 +0x14e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:278 +0x7d
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:241 +0xc3
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:216 +0x19c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:217 +0x157c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Previous read at 0x00c420593030 by goroutine 442:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*FSContext).SetWorkingDirectory()
      pkg/sentry/kernel/fs_context.go:117 +0x59
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Chdir.func1()
      pkg/sentry/syscalls/linux/sys_file.go:650 +0x1a5
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpOn()
      pkg/sentry/syscalls/linux/sys_file.go:111 +0x235
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Chdir()
      pkg/sentry/syscalls/linux/sys_file.go:639 +0x147
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:162 +0x14e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:278 +0x7d
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:241 +0xc3
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:216 +0x19c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:217 +0x157c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/23 09:25 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.