panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x76c2f4] goroutine 35 [running]: github.com/google/syzkaller/prog.ForeachArg(0xc0023da740, 0xc001d5a5e0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/analysis.go:120 +0x64 github.com/google/syzkaller/prog.getCompatibleResources(0xc0023da4c0, 0x900149, 0xb, 0xc0020901a0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:892 +0xb9 github.com/google/syzkaller/prog.(*randGen).resourceCentric(0xc0020901a0, 0xc00126f540, 0xcac6a0, 0x0, 0x0, 0x0, 0xc000d07da0, 0xc0004167e8, 0x792cb9) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:840 +0xfe github.com/google/syzkaller/prog.(*ResourceType).generate(0xcac6a0, 0xc0020901a0, 0xc00126f540, 0x0, 0x9b2b60, 0xc000d07da0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:669 +0x27c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8f00, 0xcac6a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xd402e0, 0xc, 0xc, 0xaaaaaaaaaaaaaa00, 0x38, 0x8, 0x40c698, 0x203000, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb6c60, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0x10, 0x20, 0x20, 0x20) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb6c60, 0xc000eb0000, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xcb6e20, 0x2, 0x2, 0x0, 0xc000100a80, 0x203000, 0xc000416ce0, 0xc000416c70, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb6de0, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0x10, 0x20, 0xc00202cc00, 0x9b8fc0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb6de0, 0xc000140000, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*UnionType).generate(0xcaf9e0, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0xc00202cc00, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:788 +0xbf github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b9080, 0xcaf9e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xcb5c60, 0x2, 0x2, 0xaaaaaaaaaaaaaa00, 0x38, 0xc000417048, 0x40c698, 0x10, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb5c20, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0xc000d07a90, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb5c20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xcb4ce0, 0x2, 0x2, 0xc0012a9100, 0x0, 0xc000417350, 0x791647, 0xcb75a0, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb4ca0, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0x40c698, 0x203000, 0x203000, 0x203000) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb4ca0, 0x9b0000, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*UnionType).generate(0xcaf860, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0x2, 0x203000, 0x10, 0x10) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:788 +0xbf github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b9080, 0xcaf860, 0x261930000, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xcab220, 0x1, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb4de0, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0xc002090600, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb4de0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xccea40, 0x4, 0x4, 0xc000417800, 0xc000417a60, 0x76c7c1, 0xc0012a8f88, 0xcb3ca0, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*StructType).generate(0xcb4da0, 0xc0020901a0, 0xc00126f540, 0x0, 0xd79600, 0x0, 0xc000417ae0, 0xc0012a8f88, 0xcb3ca0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:780 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8fc0, 0xcb4da0, 0xc000410000, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*PtrType).generate(0xcae860, 0xc0020901a0, 0xc00126f540, 0x0, 0x9b2b60, 0xc000d07980, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:797 +0x123 github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc0020901a0, 0xc00126f540, 0x9b8e40, 0xcae860, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:658 +0x450 github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:608 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc0020901a0, 0xc00126f540, 0xcb3ca0, 0x2, 0x2, 0x49ff00, 0xc0028e9800, 0x16f, 0x16f, 0x10df, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:596 +0x116 github.com/google/syzkaller/prog.(*randGen).generateParticularCall(0xc0020901a0, 0xc00126f540, 0xd32660, 0x161, 0xc00126f540, 0xc00243cec8) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:551 +0xd5 github.com/google/syzkaller/prog.(*randGen).generateCall(0xc0020901a0, 0xc00126f540, 0xc0012a8f40, 0x1, 0xc0012a8f40, 0x0, 0xc00126f540) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:540 +0x95 github.com/google/syzkaller/prog.(*mutator).insertCall(0xc001d5be18, 0x14) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:141 +0xf2 github.com/google/syzkaller/prog.(*Prog).Mutate(0xc0012a8f40, 0x9ac260, 0xc00250a990, 0x14, 0xc002340280, 0xc002968000, 0x2698, 0x3000) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:45 +0x2ea main.(*Proc).smashInput(0xc0023402c0, 0xc002a7fb90) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/proc.go:213 +0x131 main.(*Proc).loop(0xc0023402c0) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/proc.go:78 +0x16b created by main.main /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:260 +0x1188 OpenBSD/amd64 (ci-openbsd-multicore-8.c.syzkaller.internal) (tty00) login: