gvisor/pkg/sentry/socket/unix/transport
Andrei Vagin 70c45e09cf socket/unix: (*connectionedEndpoint).State() has to take the endpoint lock
It accesses e.receiver which is protected by the endpoint lock.

WARNING: DATA RACE
Write at 0x00c0006aa2b8 by goroutine 189:
  pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Connect.func1()
      pkg/sentry/socket/unix/transport/connectioned.go:359 +0x50
  pkg/sentry/socket/unix/transport.(*connectionedEndpoint).BidirectionalConnect()
      pkg/sentry/socket/unix/transport/connectioned.go:327 +0xa3c
  pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Connect()
      pkg/sentry/socket/unix/transport/connectioned.go:363 +0xca
  pkg/sentry/socket/unix.(*socketOpsCommon).Connect()
      pkg/sentry/socket/unix/unix.go:420 +0x13a
  pkg/sentry/socket/unix.(*SocketOperations).Connect()
      <autogenerated>:1 +0x78
  pkg/sentry/syscalls/linux.Connect()
      pkg/sentry/syscalls/linux/sys_socket.go:286 +0x251

Previous read at 0x00c0006aa2b8 by goroutine 270:
  pkg/sentry/socket/unix/transport.(*baseEndpoint).Connected()
      pkg/sentry/socket/unix/transport/unix.go:789 +0x42
  pkg/sentry/socket/unix/transport.(*connectionedEndpoint).State()
      pkg/sentry/socket/unix/transport/connectioned.go:479 +0x2f
  pkg/sentry/socket/unix.(*socketOpsCommon).State()
      pkg/sentry/socket/unix/unix.go:714 +0xc3e
  pkg/sentry/socket/unix.(*socketOpsCommon).SendMsg()
      pkg/sentry/socket/unix/unix.go:466 +0xc44
  pkg/sentry/socket/unix.(*SocketOperations).SendMsg()
      <autogenerated>:1 +0x173
  pkg/sentry/syscalls/linux.sendTo()
      pkg/sentry/syscalls/linux/sys_socket.go:1121 +0x4c5
  pkg/sentry/syscalls/linux.SendTo()
      pkg/sentry/syscalls/linux/sys_socket.go:1134 +0x87

Reported-by: syzbot+c2be37eedc672ed59a86@syzkaller.appspotmail.com
PiperOrigin-RevId: 317236996
2020-06-18 20:28:10 -07:00
..
BUILD Convert int and bool socket options to use GetSockOptInt and GetSockOptBool 2020-04-09 09:31:48 -07:00
connectioned.go socket/unix: (*connectionedEndpoint).State() has to take the endpoint lock 2020-06-18 20:28:10 -07:00
connectioned_state.go
connectionless.go Update package locations. 2020-01-27 15:31:32 -08:00
queue.go Prevent arbitrary size allocation when sending UDS messages. 2020-01-28 18:46:14 -08:00
unix.go Permit setting unknown options 2020-04-17 06:41:38 -07:00