syzbot


DATA RACE in fs.Rename (4)

Status: moderation: reported syz repro on 2020/07/25 18:04
Reported-by: syzbot+0f64dbf6fe828b61a863@syzkaller.appspotmail.com
First crash: 1591d, last: 1591d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in fs.Rename (3) 1 1775d 1775d 0/26 fixed on 2020/01/18 20:38
gvisor DATA RACE in fs.Rename C 16 2337d 2347d 0/26 fixed on 2018/07/04 07:42
gvisor DATA RACE in fs.Rename (2) C 433 2060d 2082d 0/26 fixed on 2019/12/06 21:56

Sample crash report:
WARNING: DATA RACE
Write at 0x00c00032e1c8 by goroutine 199:
  gvisor.dev/gvisor/pkg/sentry/fs.Rename()
      pkg/sentry/fs/dirent.go:1510 +0x64b
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.renameAt.func1.1()
      pkg/sentry/syscalls/linux/sys_file.go:2057 +0x1da
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.fileOpAt()
      pkg/sentry/syscalls/linux/sys_file.go:50 +0x218
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.renameAt.func1()
      pkg/sentry/syscalls/linux/sys_file.go:2045 +0x1fa
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.fileOpAt()
      pkg/sentry/syscalls/linux/sys_file.go:50 +0x218
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.renameAt()
      pkg/sentry/syscalls/linux/sys_file.go:2033 +0x180
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Rename()
      pkg/sentry/syscalls/linux/sys_file.go:2066 +0x60
  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 +0x31c

Previous read at 0x00c00032e1c8 by goroutine 267:
  gvisor.dev/gvisor/pkg/sentry/fs.(*Dirent).IsRoot()
      pkg/sentry/fs/dirent.go:244 +0x146
  gvisor.dev/gvisor/pkg/sentry/fs.(*Dirent).GetDotAttrs()
      pkg/sentry/fs/dirent.go:796 +0x154
  gvisor.dev/gvisor/pkg/sentry/fs.direntReaddir()
      pkg/sentry/fs/dirent.go:870 +0x132
  gvisor.dev/gvisor/pkg/sentry/fs.DirentReaddir()
      pkg/sentry/fs/dirent.go:840 +0x97
  gvisor.dev/gvisor/pkg/sentry/fs/ramfs.(*dirFileOperations).Readdir()
      pkg/sentry/fs/ramfs/dir.go:466 +0x282
  gvisor.dev/gvisor/pkg/sentry/fs.(*File).Readdir()
      pkg/sentry/fs/file.go:250 +0x168
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.getdents()
      pkg/sentry/syscalls/linux/sys_getdents.go:83 +0x34f
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Getdents64()
      pkg/sentry/syscalls/linux/sys_getdents.go:60 +0x13f
  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 +0x31c

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/18 17:24 gvisor feb1d3d5a7d9 9c812472 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/07/18 17:00 gvisor feb1d3d5a7d9 9c812472 .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
* Struck through repros no longer work on HEAD.