Skip to content
Permalink
Browse files

Adding go-fuzz section and two articles (#4)

* Add go-fuzz section and two articles
  • Loading branch information...
parsiya committed Oct 21, 2018
1 parent 806acf3 commit 3c6002b420e0e89dd3ed75b91178f2c4e760bd63
Showing with 1,342 additions and 1 deletion.
  1. +12 −1 README.md
  2. +11 −0 code/06/06.2/Fuzz.go
  3. BIN code/06/06.2/corpus.zip
  4. +1 −0 code/06/06.2/crashers/17ee301be06245aa20945bc3ff3c4838abe13b52
  5. +24 −0 code/06/06.2/crashers/17ee301be06245aa20945bc3ff3c4838abe13b52.output
  6. +1 −0 code/06/06.2/crashers/17ee301be06245aa20945bc3ff3c4838abe13b52.quoted
  7. +8 −0 code/06/06.2/suppressions/ce7eb9cb7943ef3a148eec15298e36694e30d395
  8. +12 −0 code/06/06.2/test1.go
  9. +16 −0 code/06/06.2/test2.go
  10. +13 −0 code/06/06.3/Fuzz.go
  11. BIN code/06/06.3/corpus.zip
  12. BIN code/06/06.3/crashers/171e8e5ca3e3d609322376915dcfa3dd56938845
  13. +43 −0 code/06/06.3/crashers/171e8e5ca3e3d609322376915dcfa3dd56938845.output
  14. +19 −0 code/06/06.3/crashers/171e8e5ca3e3d609322376915dcfa3dd56938845.quoted
  15. BIN code/06/06.3/crashers/3f5b7d448a0791f5739fa0a2371bb2492b64f835
  16. +22 −0 code/06/06.3/crashers/3f5b7d448a0791f5739fa0a2371bb2492b64f835.output
  17. +10 −0 code/06/06.3/crashers/3f5b7d448a0791f5739fa0a2371bb2492b64f835.quoted
  18. BIN code/06/06.3/crashers/49dfc363adbbe5aac9c2f8afbb0591c3ef1de2c3
  19. +18 −0 code/06/06.3/crashers/49dfc363adbbe5aac9c2f8afbb0591c3ef1de2c3.output
  20. +6 −0 code/06/06.3/crashers/49dfc363adbbe5aac9c2f8afbb0591c3ef1de2c3.quoted
  21. BIN code/06/06.3/crashers/a59a2ad5701156b88c6a132e1340fe006f67280c
  22. +20 −0 code/06/06.3/crashers/a59a2ad5701156b88c6a132e1340fe006f67280c.output
  23. +2 −0 code/06/06.3/crashers/a59a2ad5701156b88c6a132e1340fe006f67280c.quoted
  24. 0 code/06/06.3/gofuzz_test.go
  25. +12 −0 code/06/06.3/goos-goarch.go
  26. +9 −0 code/06/06.3/int-overflow-test.go
  27. +17 −0 code/06/06.3/int-pointer-size.go
  28. +8 −0 code/06/06.3/suppressions/0fad3395539b4ffbbd22b457868a6c2f87c18457
  29. +10 −0 code/06/06.3/suppressions/3574328da5110d545dcd91e9df5bf1b6d3942570
  30. +9 −0 code/06/06.3/suppressions/3c85b0906fcb8dfb9fbf5035333f8e955b3d7b1c
  31. +13 −0 code/06/06.3/suppressions/8b21b5678278e10daa110f0c85c6802003702e06
  32. +3 −0 code/06/06.3/suppressions/8cbede20ad9d530818fd357f8f046057ebb6f7e0
  33. +12 −0 code/06/06.3/suppressions/b34668fc3badc1bd2b13e3461f12b60d69acc548
  34. +14 −0 code/06/06.3/suppressions/d2f7c5b79258d20c8dbd9d4ca3241b85a93e7418
  35. +24 −0 code/06/06.3/test-crash-3f.go
  36. +24 −0 code/06/06.3/test-crash-49.go
  37. +24 −0 code/06/06.3/test-crash-a5.go
  38. +13 −0 content/06.0.md
  39. +28 −0 content/06.1.md
  40. +325 −0 content/06.2.md
  41. +559 −0 content/06.3.md
  42. BIN content/images/06/06.2-01-fuzz.png
  43. BIN content/images/06/06.2-02-go-fuzz-build.png
  44. BIN content/images/06/06.2-03-running.png
  45. BIN content/images/06/06.3-01-ram.png
  46. BIN content/images/06/06.3-02-fuzzer-crash.png
@@ -25,6 +25,10 @@ These documents are based on the `Gray/Black Hat Python/C#` series of books. I l
+ [04.5 - SSH Harvester](content/04.5.md)
- [05 - Parsing Files](content/05.0.md)
+ [05.1 - Extracting PNG Chunks](content/05.1.md)
- [06 - Go-Fuzz](content/06.0.md)
+ [06.1 - Go-Fuzz Quickstart](content/06.1.md)
+ [06.2 - Fuzzing iprange with Go-Fuzz](content/06.2.md)
+ [06.2 - Fuzzing goexif2 with Go-Fuzz](content/06.3.md)

## Code

@@ -33,6 +37,7 @@ These documents are based on the `Gray/Black Hat Python/C#` series of books. I l
- [03 - Useful Go packages](code/03)
- [04 - Go networking](code/04)
- [05 - Parsing Files](code/05)
- [06 - Go-Fuzz](code/06)

### FAQ

@@ -54,7 +59,7 @@ Honestly I will be very much interested in a similar guide for Rust/Haskell gear
I am always interested in feedback. There will be errors and there are always better ways to code. Please create an issue here. If this has helped you please let me know, it helps with the grind.

## Other resources
There are tons of Go resources online. I am going to try not to re-hash what has been already created. Hacking with Go is not meant to be self-contained. When in doubt, use one of these resources or just search.
There are tons of Go resources online. I am going to try not to re-hash what has been already created. `Hacking with Go` is not meant to be self-contained. When in doubt, use one of these resources or just search.

The following links helped me get started:

@@ -64,6 +69,11 @@ The following links helped me get started:
- Go playground: [https://play.golang.org/][go-playground]
- Effective Go: [https://golang.org/doc/effective_go.html][effective-go]

Similar resources to `Hacking with Go`:

- [Security with Go][security-with-go] published by Packt: https://github.com/PacktPublishing/Security-with-Go
- `goHackTools`: https://github.com/dreddsa5dies/goHackTools

## License

- Code in this repository is licensed under [GPLv3](LICENSE).
@@ -78,3 +88,4 @@ The following links helped me get started:
[go-playground]: https://play.golang.org/
[CC-4]: https://creativecommons.org/licenses/by-nc-sa/4.0/
[effective-go]: https://golang.org/doc/effective_go.html
[security-with-go]: https://www.packtpub.com/networking-and-servers/security-go
@@ -0,0 +1,11 @@
// +build gofuzz

package iprange

func Fuzz(data []byte) int {
_, err := ParseList(string(data))
if err != nil {
return 0
}
return 1
}
Binary file not shown.
@@ -0,0 +1,24 @@
1
80000000
0.0.0.0
40
<nil>
<nil>
panic: runtime error: index out of range

goroutine 1 [running]:
encoding/binary.binary.bigEndian.Uint32(...)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/goroot/src/encoding/binary/binary.go:111
github.com/malfunkt/iprange.(*ipParserImpl).Parse(0xc04209d800, 0x526cc0, 0xc042083040, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/gopath/src/github.com/malfunkt/iprange/y.go:510 +0x2be1
github.com/malfunkt/iprange.ipParse(0x526cc0, 0xc042083040, 0xa)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/gopath/src/github.com/malfunkt/iprange/y.go:308 +0x8f
github.com/malfunkt/iprange.ParseList(0xc042075ed0, 0xa, 0xa, 0x200000, 0xc042075ed0, 0xa, 0x8)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/gopath/src/github.com/malfunkt/iprange/y.go:63 +0xd6
github.com/malfunkt/iprange.Fuzz(0x3750000, 0xa, 0x200000, 0x3)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/gopath/src/github.com/malfunkt/iprange/fuzz.go:4 +0x84
go-fuzz-dep.Main(0x5196e0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/goroot/src/go-fuzz-dep/main.go:49 +0xb4
main.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build049016974/gopath/src/github.com/malfunkt/iprange/go.fuzz.main/main.go:10 +0x34
exit status 2
@@ -0,0 +1,8 @@
panic: runtime error: index out of range
encoding/binary.binary.bigEndian.Uint32
github.com/malfunkt/iprange.(*ipParserImpl).Parse
github.com/malfunkt/iprange.ipParse
github.com/malfunkt/iprange.ParseList
github.com/malfunkt/iprange.Fuzz
go-fuzz-dep.Main
main.main
@@ -0,0 +1,12 @@
// Small program to test panic when calling Uint32(nil).
package main

import (
"encoding/binary"
)

func main() {
_ = binary.BigEndian.Uint32(nil)
// _ = binary.BigEndian.Uint32([]byte(nil))

}
@@ -0,0 +1,16 @@
// Small program to investigate a panic in iprange for invalid masks.
package main

import "github.com/malfunkt/iprange"

func main() {
_ = Fuzz([]byte("0.0.0.0/40"))
}

func Fuzz(data []byte) int {
_, err := iprange.ParseList(string(data))
if err != nil {
return 0
}
return 1
}
@@ -0,0 +1,13 @@
// +build gofuzz

package exif

import "bytes"

func Fuzz(data []byte) int {
_, err := Decode(bytes.NewReader(data))
if err != nil {
return 0
}
return 1
}
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,43 @@
runtime: out of memory: cannot allocate 25769803776-byte block (25832882176 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0x547da6, 0xd)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/panic.go:616 +0x88
runtime.largeAlloc(0x600000000, 0x440001, 0x5f8330)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/malloc.go:828 +0x117
runtime.mallocgc.func1()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/malloc.go:721 +0x4d
runtime.systemstack(0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/asm_amd64.s:409 +0x7e
runtime.mstart()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/proc.go:1175

goroutine 1 [running]:
runtime.systemstack_switch()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/asm_amd64.s:363 fp=0xc042451790 sp=0xc042451788 pc=0x44cfe0
runtime.mallocgc(0x600000000, 0x518c80, 0x1, 0x28)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/malloc.go:720 +0x8e1 fp=0xc042451830 sp=0xc042451790 pc=0x40f011
runtime.makeslice(0x518c80, 0x40000000, 0x40000000, 0x460603, 0xc645b92c60, 0xc645bec1f8)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/slice.go:61 +0x7e fp=0xc042451860 sp=0xc042451830 pc=0x439b3e
github.com/xor-gate/goexif2/tiff.(*Tag).convertVals(0xc645c12000, 0xc645b92c90, 0xc645bec1f8)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:258 +0x88c fp=0xc042451988 sp=0xc042451860 pc=0x4fd63c
github.com/xor-gate/goexif2/tiff.DecodeTag(0x30a0048, 0xc645b92c90, 0x5605c0, 0x613170, 0x3, 0xc3458b2600, 0x2)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:182 +0x623 fp=0xc042451b50 sp=0xc042451988 pc=0x4fc3f3
github.com/xor-gate/goexif2/tiff.DecodeDir(0x30a0048, 0xc645b92c90, 0x5605c0, 0x613170, 0xc645b92c90, 0x0, 0x0, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tiff.go:150 +0x1c5 fp=0xc042451c18 sp=0xc042451b50 pc=0x5010e5
github.com/xor-gate/goexif2/tiff.Decode(0x560280, 0xc645b92c90, 0xc645b92c60, 0x560280, 0xc645b92c90)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tiff.go:99 +0x548 fp=0xc042451d78 sp=0xc042451c18 pc=0x500518
github.com/xor-gate/goexif2/exif.Decode(0x560240, 0xc645b92c60, 0x5aea8ca7, 0x2cafd418, 0x5dfc57635)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:316 +0xa19 fp=0xc042451ec8 sp=0xc042451d78 pc=0x504599
github.com/xor-gate/goexif2/exif.Fuzz(0x39b0000, 0x16d, 0x200000, 0x3)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/Fuzz.go:8 +0xba fp=0xc042451f00 sp=0xc042451ec8 pc=0x5026ea
go-fuzz-dep.Main(0x550580)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/go-fuzz-dep/main.go:49 +0xb4 fp=0xc042451f70 sp=0xc042451f00 pc=0x46f9d4
main.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/go.fuzz.main/main.go:10 +0x34 fp=0xc042451f88 sp=0xc042451f70 pc=0x506984
runtime.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/proc.go:198 +0x20e fp=0xc042451fe0 sp=0xc042451f88 pc=0x42a9de
runtime.goexit()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc042451fe8 sp=0xc042451fe0 pc=0x44f871
exit status 2
@@ -0,0 +1,19 @@
"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00H\x00H\x00\x00" +
"\xff\xe1\a\xe5Exif\x00\x00II*\x00\b\x00\x00\x00\v\x00" +
"\x0f\x01\x02\x00\x14\x00\x00\x00\x92\x00\x00\x00\x10\x01\x02\x00\b\x00\x00\x00" +
"\xa6\x00\x00\x00\x12\x01\x03\x00\x01\x00\x00\x00\x01\x00\x00\x00\x1a\x01\x05\x00" +
"\x00\x00\x00@\x06\x00\x00\x1c\x00\x00\x00\n\x00\x00\x002006:" +
"10:22 15:44:29\x002006:" +
"10:22 15:44:29\x00\x04\x00\x00\x00\x01" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x1e\x00\x00\x00\n\x00\x00\x00\x9e" +
"\x00\x00\x00\n\x00\x00\x00ASCII\x00\x00\x00 " +
" " +
" " +
" " +
" " +
" " +
" \x00\x00\x00\x00\x00d\x00\x00" +
"\x0077c6274bd589ad50395" +
"891e84a8b673b\x00\x00\x02\x00\x01\x00\x02" +
"\x00\x04\x00\x00\x00R98\x00\x02\x00\a\x00\x04\x00\x00\x00010" +
"0\x00\x00\x00\x00"
Binary file not shown.
@@ -0,0 +1,22 @@
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
github.com/xor-gate/goexif2/tiff.(*Tag).convertVals(0xc042056820, 0xc042074450, 0xc04200e2e8)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:258 +0x88c
github.com/xor-gate/goexif2/tiff.DecodeTag(0x2964060, 0xc042074450, 0x5605c0, 0x613170, 0x514c20, 0xc04200e2c4, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:182 +0x623
github.com/xor-gate/goexif2/tiff.DecodeDir(0x2964060, 0xc042074450, 0x5605c0, 0x613170, 0xc042074450, 0x0, 0xc042074540, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tiff.go:150 +0x1c5
github.com/xor-gate/goexif2/exif.loadSubDir(0xc0420744e0, 0x547f15, 0xe, 0xc042074390, 0xc042074510, 0xc04207dd68)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:220 +0x380
github.com/xor-gate/goexif2/exif.(*parser).Parse(0x613170, 0xc0420744e0, 0xc042074480, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:190 +0x174
github.com/xor-gate/goexif2/exif.Decode(0x560240, 0xc042074450, 0x5ae9364a, 0x11afa814, 0x16f365)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:331 +0x503
github.com/xor-gate/goexif2/exif.Fuzz(0x3990000, 0xba, 0x200000, 0xc042047f48)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/Fuzz.go:8 +0xba
go-fuzz-dep.Main(0x550580)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/go-fuzz-dep/main.go:49 +0xb4
main.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/go.fuzz.main/main.go:10 +0x34
exit status 2
@@ -0,0 +1,10 @@
"II*\x00\b\x00\x00\x00\t\x000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"000000i\x87\x04\x00\x01\x00\x00\x00\xac\x00\x00\x0000" +
"00000000000000000000" +
"00000000000000000000" +
"0000000000000000\x05\x00\x00\x00" +
"\x00\xe00000"
Binary file not shown.
@@ -0,0 +1,18 @@
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/xor-gate/goexif2/tiff.(*Tag).Int64(...)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:363
github.com/xor-gate/goexif2/exif.loadSubDir(0xc042080510, 0x547f15, 0xe, 0xc042080390, 0xc042080540, 0xc042089d68)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:211 +0x704
github.com/xor-gate/goexif2/exif.(*parser).Parse(0x613170, 0xc042080510, 0xc0420804b0, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:190 +0x174
github.com/xor-gate/goexif2/exif.Decode(0x560240, 0xc042080480, 0x5ae92f8f, 0x212abedc, 0x1e9999)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:331 +0x503
github.com/xor-gate/goexif2/exif.Fuzz(0x38f0000, 0x72, 0x200000, 0xc042047f48)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/Fuzz.go:8 +0xba
go-fuzz-dep.Main(0x550580)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/go-fuzz-dep/main.go:49 +0xb4
main.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/go.fuzz.main/main.go:10 +0x34
exit status 2
@@ -0,0 +1,6 @@
"MM\x00*\x00\x00\x00\b\x00\a0000000000" +
"00000000000000000000" +
"000000000000000000\x87i" +
"\x00\x04\x00\x00\x00\x0000000000000000" +
"00000000000000000000" +
"00000000000000"
Binary file not shown.
@@ -0,0 +1,20 @@
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
github.com/xor-gate/goexif2/tiff.(*Tag).convertVals(0xc04205a280, 0xc042080480, 0xc04200e090)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:258 +0x88c
github.com/xor-gate/goexif2/tiff.DecodeTag(0x30a0000, 0xc042080480, 0x5605c0, 0x613170, 0x514c20, 0xc04200e06c, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tag.go:182 +0x623
github.com/xor-gate/goexif2/tiff.DecodeDir(0x30a0000, 0xc042080480, 0x5605c0, 0x613170, 0xc042080480, 0x0, 0x0, 0x0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tiff.go:150 +0x1c5
github.com/xor-gate/goexif2/tiff.Decode(0x560240, 0xc042080480, 0x4, 0x4, 0xc042089df0)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/tiff/tiff.go:99 +0x548
github.com/xor-gate/goexif2/exif.Decode(0x560240, 0xc042080480, 0x5ae92fcc, 0x29751e98, 0x1e9999)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/exif.go:285 +0x330
github.com/xor-gate/goexif2/exif.Fuzz(0x3900000, 0x16, 0x200000, 0xc042047f48)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/Fuzz.go:8 +0xba
go-fuzz-dep.Main(0x550580)
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/goroot/src/go-fuzz-dep/main.go:49 +0xb4
main.main()
C:/Users/Parsia/AppData/Local/Temp/go-fuzz-build214414686/gopath/src/github.com/xor-gate/goexif2/exif/go.fuzz.main/main.go:10 +0x34
exit status 2
@@ -0,0 +1,2 @@
"II*\x00\b\x00\x00\x000000\x05\x00\x00\x00\x00\xa000" +
"00"
No changes.
@@ -0,0 +1,12 @@
// Get OS and architecture.
package main

import (
"fmt"
"runtime"
)

func main() {
fmt.Println(runtime.GOOS)
fmt.Println(runtime.GOARCH)
}
@@ -0,0 +1,9 @@
// Testing overflow on int.
package main

import "fmt"

func main() {
i := int(2684354560)
fmt.Println(i)
}
@@ -0,0 +1,17 @@
// Get int and pointer size.
package main

import (
"fmt"
"unsafe"
)

func main() {
var i int
var p *int
var p2 *float32

fmt.Printf("Size of int : %d\n", unsafe.Sizeof(i))
fmt.Printf("Size of *int : %d\n", unsafe.Sizeof(p))
fmt.Printf("Size of *float32 : %d\n", unsafe.Sizeof(p2))
}
@@ -0,0 +1,8 @@
panic: runtime error: index out of range
github.com/xor-gate/goexif2/tiff.(*Tag).Int64
github.com/xor-gate/goexif2/exif.loadSubDir
github.com/xor-gate/goexif2/exif.(*parser).Parse
github.com/xor-gate/goexif2/exif.Decode
github.com/xor-gate/goexif2/exif.Fuzz
go-fuzz-dep.Main
main.main
@@ -0,0 +1,10 @@
panic: runtime error: makeslice: len out of range
github.com/xor-gate/goexif2/tiff.(*Tag).convertVals
github.com/xor-gate/goexif2/tiff.DecodeTag
github.com/xor-gate/goexif2/tiff.DecodeDir
github.com/xor-gate/goexif2/exif.loadSubDir
github.com/xor-gate/goexif2/exif.(*parser).Parse
github.com/xor-gate/goexif2/exif.Decode
github.com/xor-gate/goexif2/exif.Fuzz
go-fuzz-dep.Main
main.main
@@ -0,0 +1,9 @@
panic: runtime error: makeslice: len out of range
github.com/xor-gate/goexif2/tiff.(*Tag).convertVals
github.com/xor-gate/goexif2/tiff.DecodeTag
github.com/xor-gate/goexif2/tiff.DecodeDir
github.com/xor-gate/goexif2/tiff.Decode
github.com/xor-gate/goexif2/exif.Decode
github.com/xor-gate/goexif2/exif.Fuzz
go-fuzz-dep.Main
main.main
@@ -0,0 +1,13 @@
fatal error: out of memory
runtime.systemstack_switch
runtime.(*mcache).nextFree
runtime.mallocgc
runtime.newobject
errors.New
fmt.Errorf
github.com/xor-gate/goexif2/exif.Decode
github.com/xor-gate/goexif2/exif.Fuzz
go-fuzz-dep.Main
main.main
runtime.main
runtime.goexit
@@ -0,0 +1,3 @@
program hanged (timeout 10 seconds)

exit status 1
@@ -0,0 +1,12 @@
fatal error: out of memory
runtime.systemstack_switch
runtime.(*mcache).nextFree
runtime.mallocgc
runtime.makeslice
github.com/xor-gate/goexif2/exif.newAppSec
github.com/xor-gate/goexif2/exif.Decode
github.com/xor-gate/goexif2/exif.Fuzz
go-fuzz-dep.Main
main.main
runtime.main
runtime.goexit
Oops, something went wrong.

0 comments on commit 3c6002b

Please sign in to comment.
You can’t perform that action at this time.