syzbot


DATA RACE in transport.(*connectionedEndpoint).Connect.func1

Status: fixed on 2020/06/19 10:30
Fix commit: 70c45e09cfd1 socket/unix: (*connectionedEndpoint).State() has to take the endpoint lock
First crash: 1628d, last: 1622d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in transport.(*connectionedEndpoint).Connect.func1 (2) C 4 1008d 1001d 14/26 fixed on 2022/03/05 04:04

Sample crash report:
WARNING: DATA RACE
Write at 0x00c0003569b8 by goroutine 200:
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Connect.func1()
      pkg/sentry/socket/unix/transport/connectioned.go:359 +0x50
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).BidirectionalConnect()
      pkg/sentry/socket/unix/transport/connectioned.go:327 +0xa3c
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Connect()
      pkg/sentry/socket/unix/transport/connectioned.go:363 +0xca
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketOpsCommon).Connect()
      pkg/sentry/socket/unix/unix.go:420 +0x13a
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*SocketOperations).Connect()
      <autogenerated>:1 +0x78
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Connect()
      pkg/sentry/syscalls/linux/sys_socket.go:286 +0x251
  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:305 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:265 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:240 +0x1e7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:259 +0x1697
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x320

Previous read at 0x00c0003569b8 by goroutine 193:
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*baseEndpoint).Connected()
      pkg/sentry/socket/unix/transport/unix.go:789 +0x42
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).State()
      pkg/sentry/socket/unix/transport/connectioned.go:479 +0x2f
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketOpsCommon).State()
      pkg/sentry/socket/unix/unix.go:714 +0xc3e
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketOpsCommon).SendMsg()
      pkg/sentry/socket/unix/unix.go:466 +0xc44
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*SocketOperations).SendMsg()
      <autogenerated>:1 +0x173
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.sendTo()
      pkg/sentry/syscalls/linux/sys_socket.go:1121 +0x4c5
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.SendTo()
      pkg/sentry/syscalls/linux/sys_socket.go:1134 +0x87
  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:305 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:265 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:240 +0x1e7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:259 +0x1697
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x320

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/16 03:16 gvisor eb6d3d771094 baca2611 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/16 03:04 gvisor eb6d3d771094 baca2611 .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2020/06/14 02:11 gvisor 3b5eaad3c8b4 dbce178a .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/12 13:30 gvisor 61d6c059ac34 819b58b0 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/12 13:08 gvisor 61d6c059ac34 819b58b0 .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2020/06/12 05:34 gvisor 61d6c059ac34 819b58b0 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/11 22:09 gvisor a085e562d059 5c25fdab .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/11 21:55 gvisor a085e562d059 5c25fdab .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2020/06/11 19:17 gvisor a085e562d059 5c25fdab .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/06/11 19:06 gvisor a085e562d059 5c25fdab .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2020/06/18 01:17 gvisor 02072fd243a1 d45a4d69 .config console log report ci-gvisor-ptrace-direct-overlay-host-race
2020/06/17 05:57 gvisor 622f7986896a b9f3810b .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/06/17 03:30 gvisor 622f7986896a b9f3810b .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/06/16 03:35 gvisor eb6d3d771094 baca2611 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/06/16 02:52 gvisor eb6d3d771094 baca2611 .config console log report ci-gvisor-ptrace-direct-overlay-host-race
2020/06/14 08:34 gvisor 3b5eaad3c8b4 a61674a5 .config console log report ci-gvisor-ptrace-direct-overlay-host-race
2020/06/14 01:57 gvisor 3b5eaad3c8b4 dbce178a .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/06/12 12:54 gvisor 61d6c059ac34 819b58b0 .config console log report ci-gvisor-ptrace-direct-overlay-host-race
2020/06/12 05:18 gvisor 61d6c059ac34 819b58b0 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/06/11 21:43 gvisor a085e562d059 5c25fdab .config console log report ci-gvisor-ptrace-direct-overlay-host-race
2020/06/11 18:54 gvisor a085e562d059 5c25fdab .config console log report ci-gvisor-ptrace-direct-overlay-host-race
* Struck through repros no longer work on HEAD.