You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the input {222222222232222}{} the function defmt_parser::parse(input, defmt_parser::ParserMode::ForwardsCompatible) crash with the message "memory allocation of 3555555555715568 bytes failed" instead of returning an error.
I believe this is an issue and an error should be returned instead of crashing on untrusted input.
With the input
{222222222232222}{}
the functiondefmt_parser::parse(input, defmt_parser::ParserMode::ForwardsCompatible)
crash with the message "memory allocation of 3555555555715568 bytes failed" instead of returning an error.I believe this is an issue and an error should be returned instead of crashing on untrusted input.
I found that using fuzzing. You can found the fuzzing code on https://github.com/dzamlo/defmt/tree/fuzz. The commands used to run the fuzzing is
cargo afl build
followed bycargo afl fuzz -i in -o out ../target/debug/parser-fuzz-target
. The tutorial for the fuzzer I used is available on https://rust-fuzz.github.io/book/afl/tutorial.html.The text was updated successfully, but these errors were encountered: