syzbot


DATA RACE in fs.(*UnstableAttr).SetOwner (2)

Status: fixed on 2020/02/27 21:02
Reported-by: syzbot+b57901d451489676cbd9@syzkaller.appspotmail.com
Fix commit: 115898e368e4 Prevent DATA RACE in UnstableAttr.
First crash: 1767d, last: 1767d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in fs.(*UnstableAttr).SetOwner 1 1804d 1804d 0/26 fixed on 2019/12/20 13:42

Sample crash report:
WARNING: DATA RACE
Write at 0x00c0005ca03c by goroutine 295:
  gvisor.dev/gvisor/pkg/sentry/fs.(*UnstableAttr).SetOwner()
      pkg/sentry/fs/attr.go:254 +0xc9
  gvisor.dev/gvisor/pkg/sentry/fs/fsutil.(*InodeSimpleAttributes).SetOwner()
      pkg/sentry/fs/fsutil/inode.go:139 +0x7d
  gvisor.dev/gvisor/pkg/sentry/fs/tty.(*slaveInodeOperations).SetOwner()
      <autogenerated>:1 +0x79
  gvisor.dev/gvisor/pkg/sentry/fs.(*Inode).SetOwner()
      pkg/sentry/fs/inode.go:341 +0x147
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.chown()
      pkg/sentry/syscalls/linux/sys_file.go:1682 +0x222
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Fchown()
      pkg/sentry/syscalls/linux/sys_file.go:1744 +0x14a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:170 +0x455
  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:232 +0x1aaf
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x308

Previous read at 0x00c0005ca038 by goroutine 185:
  gvisor.dev/gvisor/pkg/sentry/fs/tty.(*slaveInodeOperations).Truncate()
      <autogenerated>:1 +0x4f
  gvisor.dev/gvisor/pkg/sentry/fs.(*Inode).Truncate()
      pkg/sentry/fs/inode.go:363 +0x187
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.openAt.func1()
      pkg/sentry/syscalls/linux/sys_file.go:178 +0x601
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.fileOpOn()
      pkg/sentry/syscalls/linux/sys_file.go:111 +0x23f
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.openAt()
      pkg/sentry/syscalls/linux/sys_file.go:140 +0x141
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Open()
      pkg/sentry/syscalls/linux/sys_file.go:470 +0xfa
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:170 +0x455
  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:232 +0x1aaf
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x308

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/25 12:02 https://gvisor.googlesource.com/gvisor master cb3906ae0057 2e95ab33 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/01/25 11:43 https://gvisor.googlesource.com/gvisor master cb3906ae0057 2e95ab33 .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2020/01/25 10:41 https://gvisor.googlesource.com/gvisor master cb3906ae0057 2e95ab33 .config console log report ci-gvisor-ptrace-direct-overlay-host-race
* Struck through repros no longer work on HEAD.