syzbot


DATA RACE in netstack.(*SocketOperations).SetSockOpt

Status: fixed on 2020/03/24 03:55
Fix commit: 369cf38bd718 Fix data race in SetSockOpt.
First crash: 1710d, last: 1710d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c000bde1f0 by goroutine 350:
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketOperations).SetSockOpt()
      pkg/sentry/socket/netstack/netstack.go:1508 +0x374
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.SetSockOpt()
      pkg/sentry/syscalls/linux/sys_socket.go:541 +0x2fd
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:170 +0x44d
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:291 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:252 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:227 +0x1b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:258 +0x16a4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x320

Previous read at 0x00c000bde1f0 by goroutine 227:
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketOperations).fillCmsgInq()
      pkg/sentry/socket/netstack/netstack.go:2356 +0x45
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketOperations).nonBlockingRead()
      pkg/sentry/socket/netstack/netstack.go:2387 +0x1a81
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketOperations).RecvMsg()
      pkg/sentry/socket/netstack/netstack.go:2513 +0x1ad
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.recvFrom()
      pkg/sentry/syscalls/linux/sys_socket.go:871 +0x345
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.RecvFrom()
      pkg/sentry/syscalls/linux/sys_socket.go:896 +0x88
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:170 +0x44d
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:291 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:252 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:227 +0x1b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:258 +0x16a4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x320

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/22 09:45 gvisor fed59953aad4 78267cec .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/03/22 09:30 gvisor fed59953aad4 78267cec .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.