syzbot


DATA RACE in safemem.Copy (5)

Status: fixed on 2022/11/29 11:04
Fix commit: ae731e0394f5 Don't use other process's scratch buffer.
First crash: 738d, last: 728d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in safemem.Copy (3) C 3 1160d 1160d 14/26 fixed on 2021/09/28 10:18
gvisor DATA RACE in safemem.Copy C 4 1403d 1403d 14/26 fixed on 2021/01/26 10:37
gvisor DATA RACE in safemem.Copy (7) C 4 336d 336d 26/26 fixed on 2023/12/29 10:22
gvisor DATA RACE in safemem.Copy (6) C 121 727d 728d 26/26 fixed on 2023/10/05 23:05
gvisor DATA RACE in safemem.Copy (2) C 9 1208d 1208d 14/26 fixed on 2021/08/16 21:45
gvisor DATA RACE in safemem.Copy (4) C 1019 837d 840d 14/26 fixed on 2022/11/18 03:22

Sample crash report:
WARNING: DATA RACE
Write at 0x00c00071b3c4 by goroutine 333:
  runtime.slicecopy()
      GOROOT/src/runtime/slice.go:295 +0x0
  gvisor.dev/gvisor/pkg/safemem.Copy()
      pkg/safemem/block_unsafe.go:199 +0x39e
  gvisor.dev/gvisor/pkg/safemem.CopySeq()
      pkg/safemem/seq_unsafe.go:282 +0x22a
  gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).CopyIn.func1()
      pkg/sentry/mm/io.go:164 +0xb7
  gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings()
      pkg/sentry/mm/io.go:522 +0x187
  gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).CopyIn()
      pkg/sentry/mm/io.go:163 +0x279
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).CopyInBytes()
      pkg/sentry/kernel/task_usermem.go:57 +0x95
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.copyTimespecIn()
      pkg/sentry/syscalls/linux/timespec.go:32 +0x8a
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.ClockNanosleep()
      pkg/sentry/syscalls/linux/sys_time.go:206 +0x76
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0x9b7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x7c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0x8e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x495
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:253 +0x18f8
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x353
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:378 +0x47

Previous read at 0x00c00071b3c4 by goroutine 322:
  encoding/binary.littleEndian.Uint64()
      GOROOT/src/encoding/binary/binary.go:78 +0xe4
  gvisor.dev/gvisor/pkg/sentry/kernel.makeIovec()
      pkg/sentry/kernel/task_usermem.go:265 +0xad
  gvisor.dev/gvisor/pkg/sentry/kernel.copyInIovecs()
      pkg/sentry/kernel/task_usermem.go:231 +0x27e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*taskCopyContext).CopyInIovecs()
      pkg/sentry/kernel/task_usermem.go:411 +0xb3
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.doProcessVMReadWrite.func1()
      pkg/sentry/syscalls/linux/sys_process_vm.go:100 +0x88
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.doProcessVMReadWrite()
      pkg/sentry/syscalls/linux/sys_process_vm.go:174 +0x32d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.processVMRW()
      pkg/sentry/syscalls/linux/sys_process_vm.go:91 +0x293
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.ProcessVMReadv()
      pkg/sentry/syscalls/linux/sys_process_vm.go:37 +0x55
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:142 +0x9b7
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:322 +0x7c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:282 +0x8e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:257 +0x495
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:253 +0x18f8
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:94 +0x353
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:378 +0x47

Crashes (3153):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/29 04:20 gvisor 85a2ede1743f ca9683b8 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/29 04:16 gvisor 85a2ede1743f ca9683b8 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/29 04:02 gvisor 85a2ede1743f ca9683b8 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 19:56 gvisor 5b7274a1fc08 950c3e02 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/28 18:22 gvisor 5b7274a1fc08 950c3e02 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/26 18:34 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/26 18:33 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/26 18:16 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/26 10:02 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/26 10:02 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/26 09:54 gvisor 5b7274a1fc08 f4470a7b .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/24 10:54 gvisor 5b7274a1fc08 ff68ff8f .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/24 10:52 gvisor 5b7274a1fc08 ff68ff8f .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/24 10:37 gvisor 5b7274a1fc08 ff68ff8f .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/23 22:17 gvisor 5b7274a1fc08 3c2d90bc .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/22 22:29 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/22 22:26 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/22 22:08 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/22 17:12 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/22 17:11 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/22 16:59 gvisor 346aa6fef27d 9da37ae8 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/22 10:20 gvisor 9ff1c425909e 1c576c23 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/21 22:22 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/21 21:43 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/21 20:43 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/21 20:08 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/21 19:59 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/21 16:59 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/21 16:51 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/21 16:38 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/21 15:41 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/21 15:39 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/21 15:39 gvisor 38a0512f13fa f9a97739 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/21 09:44 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/21 09:39 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/21 09:34 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/21 01:14 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/20 16:40 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/20 13:42 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/20 13:35 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/20 13:22 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/19 11:28 gvisor 38a0512f13fa 5bb70014 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 10:15 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/29 09:12 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 09:05 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/29 07:54 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 06:54 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/29 06:28 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/29 05:26 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 05:21 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/29 03:05 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/29 02:43 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 01:39 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/29 01:31 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/29 00:20 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 23:08 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 22:31 gvisor 85a2ede1743f ca9683b8 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 21:09 gvisor 85a2ede1743f 950c3e02 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 20:07 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 19:11 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 17:18 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 17:17 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 16:16 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 15:50 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 14:46 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 14:35 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 13:16 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 12:18 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 11:14 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 10:24 gvisor 5b7274a1fc08 950c3e02 .config console log report info ci-gvisor-ptrace-3-race-cover DATA RACE in safemem.Copy
2022/11/28 09:07 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 08:22 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 08:04 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 06:57 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 06:08 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 05:06 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 04:08 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/28 03:49 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 02:44 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/28 01:44 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 00:36 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/28 00:28 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/27 23:22 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/27 22:13 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-1-race DATA RACE in safemem.Copy
2022/11/27 21:53 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-2-race DATA RACE in safemem.Copy
2022/11/27 20:46 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-3-race DATA RACE in safemem.Copy
2022/11/25 18:25 gvisor 5b7274a1fc08 0d68fcb4 .config console log report info ci-gvisor-ptrace-2-race-cover DATA RACE in safemem.Copy
* Struck through repros no longer work on HEAD.