syzbot


panic: munmap(ADDR, 0)) failed: invalid argument

Status: fixed on 2018/06/23 07:10
Fix commit: fe3fc44da3ca Handle mremap(old_size=0).
First crash: 2349d, last: 2348d

Sample crash report:
panic: munmap(2000d000, 0)) failed: invalid argument

goroutine 71 [running]:
gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*subprocess).Unmap(0xc42044e360, 0x2000d000, 0x0)
	pkg/sentry/platform/ptrace/subprocess.go:556 +0x3c6
gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).unmapASLocked(0xc4204a6000, 0x2000d000, 0x2000d000)
	pkg/sentry/mm/address_space.go:217 +0x74
gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).movePMAsLocked(0xc4204a6000, 0x2000d000, 0x2000d000, 0x20007000, 0x20008000)
	pkg/sentry/mm/pma.go:628 +0x4d8
gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MRemap(0xc4204a6000, 0xc74780, 0xc4204d0000, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x2, 0x20007000, 0x0, 0x0, ...)
	pkg/sentry/mm/syscalls.go:464 +0x8e8
gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mremap(0xc4204d0000, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x4002e0, 0x428854, 0xbdd358, 0xc42045bc08, ...)
	pkg/sentry/syscalls/linux/sys_mmap.go:137 +0xc6
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc4204d0000, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x4002e0, 0xc4201ec7e0, 0xbb4e80, ...)
	pkg/sentry/kernel/task_syscall.go:162 +0x307
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc4204d0000, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x4002e0, 0x20007000, 0x4002e0)
	pkg/sentry/kernel/task_syscall.go:278 +0x62
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc4204d0000, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x4002e0, 0xc679a0, 0xc42045be00)
	pkg/sentry/kernel/task_syscall.go:241 +0x91
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc4204d0000, 0x2, 0xc42044e360)
	pkg/sentry/kernel/task_syscall.go:216 +0x10c
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc4204d0000, 0xc679a0, 0x0)
	pkg/sentry/kernel/task_run.go:217 +0xed8
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc4204d0000, 0x7)
	pkg/sentry/kernel/task_run.go:95 +0x174
created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:251 +0x100

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/22 18:46 https://gvisor.googlesource.com/gvisor master 5d45f88f2c28 b9c7c319 .config console log report syz C ci-gvisor-main
2018/06/22 12:48 https://gvisor.googlesource.com/gvisor master 0e434b66a625 78c2562d console log report syz C ci-gvisor-main
2018/06/22 12:43 https://gvisor.googlesource.com/gvisor master 0e434b66a625 78c2562d console log report ci-gvisor-main
2018/06/22 12:42 https://gvisor.googlesource.com/gvisor master 0e434b66a625 78c2562d console log report ci-gvisor-main
2018/06/22 12:40 https://gvisor.googlesource.com/gvisor master 0e434b66a625 78c2562d console log report ci-gvisor-main
* Struck through repros no longer work on HEAD.