syzbot


DATA RACE in kernel.(*Task).setKUIDsUncheckedLocked

Status: fixed on 2018/10/15 18:31
Fix commit: f8ccfbbed487 Document more task-goroutine-owned fields in kernel.Task.
First crash: 2342d, last: 2283d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c4209dfa28 by goroutine 281:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).setKUIDsUncheckedLocked()
      pkg/sentry/kernel/task_identity.go:167 +0x1d0
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).SetUID()
      pkg/sentry/kernel/task_identity.go:70 +0x292
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Setuid()
      pkg/sentry/syscalls/linux/sys_identity.go:102 +0x45
  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:280 +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 +0x19e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1501
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Previous read at 0x00c4209dfa28 by goroutine 267:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Value()
      pkg/sentry/kernel/task.go:577 +0x71b
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel/auth.CredentialsFromContext()
      pkg/sentry/kernel/auth/context.go:32 +0x5a
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.FileOwnerFromContext()
      pkg/sentry/fs/context.go:85 +0x46
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.(*file).UnstableAttr()
      pkg/sentry/fs/proc/file.go:54 +0x1e5
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Inode).UnstableAttr()
      pkg/sentry/fs/inode.go:254 +0x217
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.stat()
      pkg/sentry/syscalls/linux/sys_stat.go:106 +0x9d
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Fstat()
      pkg/sentry/syscalls/linux/sys_stat.go:98 +0x108
  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:280 +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 +0x19e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1501
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/08/22 15:23 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report syz C ci-gvisor-ptrace-proxy-sandbox-race
2018/08/20 23:07 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report syz C ci-gvisor-ptrace-proxy-sandbox-race
2018/08/20 22:55 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report syz C ci-gvisor-kvm-direct-overlay-host-race
2018/08/26 20:45 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 758cd203 .config console log report syz ci-gvisor-kvm-direct-overlay-host-race
2018/08/22 15:12 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report syz ci-gvisor-kvm-direct-overlay-host-race
2018/08/06 01:47 https://github.com/dvyukov/gvisor.git race 72627b310e89 1beb8136 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2018/08/24 14:26 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report ci-gvisor-kvm-direct-overlay-host-race
2018/08/24 07:16 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report ci-gvisor-kvm-direct-overlay-host-race
2018/08/23 02:28 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/21 04:57 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report ci-gvisor-kvm-direct-overlay-host-race
2018/08/06 01:38 https://github.com/dvyukov/gvisor.git race 72627b310e89 1beb8136 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/15 10:41 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/06 12:49 https://github.com/dvyukov/gvisor.git race 54dabe736f40 785a9833 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/04 10:29 https://github.com/dvyukov/gvisor.git race 54dabe736f40 b9f93868 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/29 13:10 https://github.com/dvyukov/gvisor.git race 35a840ad3ceb 5c7ca877 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.