ioctl$TIOCL_PASTESEL(r1, 0x5412, &(0x7f0000001040)) 03:23:46 executing program 1: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) r1 = dup(r0) ioctl$TIOCL_PASTESEL(r1, 0x5412, &(0x7f0000001040)) panic: runtime error: index out of range [314] with length 0 goroutine 32 [running]: github.com/google/syzkaller/prog.(*randGen).resourceCentric(0xc02c670fc0, 0xc02c64f130, 0xbd22e0, 0x2, 0x0, 0xc02cffe270, 0x8, 0x8, 0x1) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:854 +0x4b5 github.com/google/syzkaller/prog.(*ResourceType).generate(0xbd22e0, 0xc02c670fc0, 0xc02c64f130, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:677 +0x346 github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc02c670fc0, 0xc02c64f130, 0x9679c0, 0xbd22e0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:665 +0x40b github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:615 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc02c670fc0, 0xc02c64f130, 0xe1bc40, 0x2, 0x2, 0x59c602, 0x413882, 0xc01800f558, 0x297441cf, 0xdd328a1ae1e9590e, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:603 +0x179 github.com/google/syzkaller/prog.(*StructType).generate(0xc6eee0, 0xc02c670fc0, 0xc02c64f130, 0x2, 0x1773d40, 0x0, 0xc0100d18c8, 0x1, 0x1) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:795 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc02c670fc0, 0xc02c64f130, 0x967aa0, 0xc6eee0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:665 +0x40b github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:615 github.com/google/syzkaller/prog.(*ArrayType).generate(0xe17980, 0xc02c670fc0, 0xc02c64f130, 0x2, 0x964800, 0xc02c675ac0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:787 +0x177 github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc02c670fc0, 0xc02c64f130, 0x9671e0, 0xe17980, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:665 +0x40b github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:615 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc02c670fc0, 0xc02c64f130, 0x114f9e0, 0x4, 0x4, 0x2, 0x413882, 0xc01800f958, 0x297441cf, 0x315825027804e2c0, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:603 +0x179 github.com/google/syzkaller/prog.(*StructType).generate(0xc6ee80, 0xc02c670fc0, 0xc02c64f130, 0x2, 0x1773d40, 0xc01800f990, 0x4eded3, 0xc002c72000, 0x46576c64cce74e2f) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:795 +0x7c github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc02c670fc0, 0xc02c64f130, 0x967aa0, 0xc6ee80, 0x400002, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:665 +0x40b github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:615 github.com/google/syzkaller/prog.(*PtrType).generate(0xc0c320, 0xc02c670fc0, 0xc02c64f130, 0x0, 0x964800, 0xc02c675ab0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:812 +0x127 github.com/google/syzkaller/prog.(*randGen).generateArgImpl(0xc02c670fc0, 0xc02c64f130, 0x9678e0, 0xc0c320, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:665 +0x40b github.com/google/syzkaller/prog.(*randGen).generateArg(...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:615 github.com/google/syzkaller/prog.(*randGen).generateArgs(0xc02c670fc0, 0xc02c64f130, 0xf8d5e0, 0x3, 0x3, 0x0, 0xc01800fc88, 0x4eded3, 0xc002c72000, 0x19f918472f7671c0, ...) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:603 +0x179 github.com/google/syzkaller/prog.(*randGen).generateParticularCall(0xc02c670fc0, 0xc02c64f130, 0x1201da0, 0x253, 0xc02c64f130, 0xc02c676f80) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:558 +0xda github.com/google/syzkaller/prog.(*randGen).generateCall(0xc02c670fc0, 0xc02c64f130, 0xc02c676100, 0x5, 0xc02c676100, 0x0, 0xc02c64f130) /syzkaller/gopath/src/github.com/google/syzkaller/prog/rand.go:547 +0x95 github.com/google/syzkaller/prog.(*mutator).insertCall(0xc01800fe18, 0x14) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:141 +0xfb github.com/google/syzkaller/prog.(*Prog).Mutate(0xc02c676100, 0x961380, 0xc00cd22990, 0x14, 0xc01d08e680, 0xc01557c000, 0xa4d7, 0xc000) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:45 +0x2ee main.(*Proc).smashInput(0xc01ba435c0, 0xc011828500) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/proc.go:213 +0x133 main.(*Proc).loop(0xc01ba435c0) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/proc.go:78 +0x1aa created by main.main /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:280 +0x13f8