Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzzer found crash #61

Closed
daaku opened this issue Jul 16, 2020 · 1 comment
Closed

fuzzer found crash #61

daaku opened this issue Jul 16, 2020 · 1 comment

Comments

@daaku
Copy link

daaku commented Jul 16, 2020

Was fuzzing my code which uses the CSS parser, and it found a case where it hangs. The input was:

"\xd0\xfe[\xe7\x82"

The output:

program hanged (timeout 10 seconds)

SIGABRT: abortPC=0x4bf769 m=0 sigcode=0

goroutine 1 [running]:
github.com/tdewolff/parse/v2/buffer.(*Lexer).PeekErr(...)
        /home/naitik/usr/go/pkg/mod/github.com/tdewolff/parse/v2@v2.4.3/buffer/lexer.go:89
github.com/tdewolff/parse/v2/buffer.(*Lexer).Err(...)
        /home/naitik/usr/go/pkg/mod/github.com/tdewolff/parse/v2@v2.4.3/buffer/lexer.go:84
github.com/tdewolff/parse/v2/css.(*Lexer).Next(0xc000106d20, 0xc000000000, 0x0, 0x0, 0x0)
        /home/naitik/usr/go/pkg/mod/github.com/tdewolff/parse/v2@v2.4.3/css/lex.go:242 +0x459 fp=0xc000106bb8 sp=0xc000106b98 pc=0x4bf769
github.com/daaku/cssdalek/internal/cssselector.Parse(0x51ab60, 0xc000182bd0, 0xc000106e98, 0x46cff6, 0x5f100007, 0x15d9d523, 0xa452f4e01bb6)
        /home/naitik/workspace/cssdalek/internal/cssselector/cssselector.go:141 +0x179f fp=0xc000106e60 sp=0xc000106bb8 pc=0x4c77df
github.com/daaku/cssdalek/internal/cssselector.Fuzz(0x7efc536a7000, 0x5, 0x5, 0x3)
        /home/naitik/workspace/cssdalek/internal/cssselector/cssselector.go:191 +0xae fp=0xc000106ea8 sp=0xc000106e60 pc=0x4c817e
go-fuzz-dep.Main(0xc000106f70, 0x1, 0x1)
        go-fuzz-dep/main.go:36 +0x1ad fp=0xc000106f58 sp=0xc000106ea8 pc=0x470ced
main.main()
        github.com/daaku/cssdalek/internal/cssselector/go.fuzz.main/main.go:15 +0x52 fp=0xc000106f88 sp=0xc000106f58 pc=0x4c8332
runtime.main()
        runtime/proc.go:203 +0x1fa fp=0xc000106fe0 sp=0xc000106f88 pc=0x43228a
runtime.goexit()
        runtime/asm_amd64.s:1373 +0x1 fp=0xc000106fe8 sp=0xc000106fe0 pc=0x45c921
@daaku
Copy link
Author

daaku commented Jul 16, 2020

Nevermind, issue was in my code.

@daaku daaku closed this as completed Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant