syzbot


DATA RACE in kernel.(*FSContext).checkAndPreventSharingOutsideTG.func1

Status: fixed on 2025/08/28 18:30
Fix commit: 1941bc68e20d Fix race between unshare(2) and execve(2).
First crash: 8d21h, last: 5d10h

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0024d49d8 by goroutine 7602:
  gvisor.dev/gvisor/pkg/sentry/kernel.(*FSContext).checkAndPreventSharingOutsideTG.func1()
      pkg/sentry/kernel/fs_context.go:205 +0x40
  gvisor.dev/gvisor/pkg/sentry/kernel.(*ThreadGroup).ForEachTask()
      pkg/sentry/kernel/threads.go:520 +0x104
  gvisor.dev/gvisor/pkg/sentry/kernel.(*FSContext).checkAndPreventSharingOutsideTG()
      pkg/sentry/kernel/fs_context.go:204 +0xd4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runExecveAfterExecveCredsLock).execute()
      pkg/sentry/kernel/task_exec.go:155 +0x258
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x390
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.gowrap1()
      pkg/sentry/kernel/task_start.go:416 +0x40

Previous write at 0x00c0024d49d8 by goroutine 7590:
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Unshare()
      pkg/sentry/kernel/task_clone.go:705 +0xd8c
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Unshare()
      pkg/sentry/syscalls/linux/sys_thread.go:453 +0x54
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:143 +0x68c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:323 +0x4c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:283 +0x74
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:258 +0x3bc
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:269 +0x1564
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x390
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.gowrap1()
      pkg/sentry/kernel/task_start.go:416 +0x40

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/26 02:01 gvisor bb664f219b9c bf27483f .config console log report syz / log ci-gvisor-arm64-ptrace-1-race DATA RACE in kernel.(*FSContext).checkAndPreventSharingOutsideTG.func1
2025/08/22 15:45 gvisor bb664f219b9c bf27483f .config console log report info ci-gvisor-ptrace-3-race DATA RACE in kernel.(*FSContext).checkAndPreventSharingOutsideTG.func1
2025/08/25 21:57 gvisor bb664f219b9c bf27483f .config console log report info ci-gvisor-arm64-ptrace-1-race DATA RACE in kernel.(*FSContext).checkAndPreventSharingOutsideTG.func1
* Struck through repros no longer work on HEAD.