syzbot


panic: Only permission mask must be set: ADDR

Status: fixed on 2021/10/26 11:13
Fix commit: 4d07fc952d6b Do not leak non-permission mode bits in mq_open(2).
First crash: 1131d, last: 1127d

Sample crash report:
panic: Only permission mask must be set: 306f333235

goroutine 528 [running]:
panic(0x188c5c0, 0xc000156010)
	GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc0004f7340 sp=0xc0004f7278 pc=0x43a6c5
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFile).Init(0xc0005b7c00, 0x1d5a6a0, 0xc0002af500, 0xc0003ce240, 0x200000000, 0x2, 0x1d2dfe0, 0xc0000300b0, 0xc0001a72d5)
	pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:55 +0x19f fp=0xc0004f7398 sp=0xc0004f7340 pc=0xae7c9f
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*filesystem).newQueueInode(0xc000030160, 0x1d5a6a0, 0xc0002af500, 0xc0003ce240, 0xc0000300b0, 0xc0000372d5, 0xc, 0xc0002af500)
	pkg/sentry/fsimpl/mqfs/queue.go:44 +0x17e fp=0xc0004f7408 sp=0xc0004f7398 pc=0xb2511e
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*RegistryImpl).New(0xc00000f968, 0x1d5a6a0, 0xc0002af500, 0xc00023c000, 0x5, 0xc0000300b0, 0x0, 0x80072d50001, 0x0, 0x0, ...)
	pkg/sentry/fsimpl/mqfs/registry.go:107 +0x12c fp=0xc0004f7498 sp=0xc0004f7408 pc=0xb26a0c
gvisor.dev/gvisor/pkg/sentry/kernel/mq.(*Registry).FindOrCreate(0xc00003ec20, 0x1d5a6a0, 0xc0002af500, 0xc00023c000, 0x5, 0x0, 0x10001, 0x14972d5, 0x0, 0x0, ...)
	pkg/sentry/kernel/mq/mq.go:189 +0x527 fp=0xc0004f7598 sp=0xc0004f7498 pc=0xb1e127
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.MqOpen(0xc0002af500, 0x20000040, 0x40, 0x6d79adb5d58472d5, 0x0, 0x0, 0x0, 0x33, 0x202, 0xc00056fc90, ...)
	pkg/sentry/syscalls/linux/vfs2/mq.go:56 +0x225 fp=0xc0004f7710 sp=0xc0004f7598 pc=0x1413325
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc0002af500, 0xf0, 0x20000040, 0x40, 0x6d79adb5d58472d5, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/kernel/task_syscall.go:103 +0x453 fp=0xc0004f79b0 sp=0xc0004f7710 pc=0xd69f93
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc0002af500, 0xf0, 0x20000040, 0x40, 0x6d79adb5d58472d5, 0x0, 0x0, 0x0, 0xc0002afddf, 0xc0002af500)
	pkg/sentry/kernel/task_syscall.go:238 +0xb4 fp=0xc0004f7a88 sp=0xc0004f79b0 pc=0xd6b774
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0002af500, 0xf0, 0x20000040, 0x40, 0x6d79adb5d58472d5, 0x0, 0x0, 0x0, 0x47910c, 0x486adf)
	pkg/sentry/kernel/task_syscall.go:198 +0x10f fp=0xc0004f7b30 sp=0xc0004f7a88 pc=0xd6b06f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc0002af500, 0x2, 0xc0002af500)
	pkg/sentry/kernel/task_syscall.go:173 +0x214 fp=0xc0004f7ca0 sp=0xc0004f7b30 pc=0xd6a7f4
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc0002af500, 0x1d2dd80, 0x0)
	pkg/sentry/kernel/task_run.go:282 +0x12c7 fp=0xc0004f7ed0 sp=0xc0004f7ca0 pc=0xd56887
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc0002af500, 0x9)
	pkg/sentry/kernel/task_run.go:97 +0x393 fp=0xc0004f7fd0 sp=0xc0004f7ed0 pc=0xd549b3
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0004f7fd8 sp=0xc0004f7fd0 pc=0x477541
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:327 +0x1a5

Crashes (756):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/22 18:05 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-1-race panic: Only permission mask must be set: ADDR
2021/10/22 15:46 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-1-cover panic: Only permission mask must be set: ADDR
2021/10/22 15:37 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/22 15:34 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/22 15:32 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-2-cover panic: Only permission mask must be set: ADDR
2021/10/22 15:22 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/22 14:52 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/22 14:44 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-kvm-cover panic: Only permission mask must be set: ADDR
2021/10/22 14:43 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-3-cover panic: Only permission mask must be set: ADDR
2021/10/22 14:24 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/26 10:05 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/26 09:43 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/26 08:39 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/26 07:42 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-2-race panic: Only permission mask must be set: ADDR
2021/10/26 06:24 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-2-race panic: Only permission mask must be set: ADDR
2021/10/26 05:21 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/26 05:15 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-1-race panic: Only permission mask must be set: ADDR
2021/10/26 04:03 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/26 02:57 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/26 01:57 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/26 00:56 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 23:56 gvisor 7c267106d1d7 c1132b49 .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/25 22:45 gvisor 7c267106d1d7 78e5f70a .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 21:35 gvisor 7c267106d1d7 78e5f70a .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/25 21:31 gvisor 7c267106d1d7 78e5f70a .config console log report info ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/25 20:30 gvisor 7c267106d1d7 78e5f70a .config console log report info ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/25 19:18 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/25 18:08 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/25 17:24 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-kvm-cover panic: Only permission mask must be set: ADDR
2021/10/25 16:22 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-1-race panic: Only permission mask must be set: ADDR
2021/10/25 15:20 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/25 14:42 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 13:35 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/25 12:53 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 11:52 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/25 10:52 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 09:36 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 09:35 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-1-race panic: Only permission mask must be set: ADDR
2021/10/25 08:21 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 07:20 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 06:10 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/25 05:04 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 03:57 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/25 02:56 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 02:45 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-kvm panic: Only permission mask must be set: ADDR
2021/10/25 01:39 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/24 23:22 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/24 22:10 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/24 21:42 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/24 20:37 gvisor 14f4113924c8 4f0000ee .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/24 19:26 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-2-race panic: Only permission mask must be set: ADDR
2021/10/24 18:37 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-3-race panic: Only permission mask must be set: ADDR
2021/10/24 17:33 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/24 16:57 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/24 15:52 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1-race panic: Only permission mask must be set: ADDR
2021/10/24 15:08 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-3 panic: Only permission mask must be set: ADDR
2021/10/24 14:04 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-2 panic: Only permission mask must be set: ADDR
2021/10/24 13:58 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/24 12:55 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1 panic: Only permission mask must be set: ADDR
2021/10/23 16:57 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-2-cover panic: Only permission mask must be set: ADDR
2021/10/22 22:04 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1-cover panic: Only permission mask must be set: ADDR
* Struck through repros no longer work on HEAD.