Fix crash-looping fuzzers: nullptr, FF constructor, deserialization#22602
Draft
randyquaye wants to merge 1 commit intonextfrom
Draft
Fix crash-looping fuzzers: nullptr, FF constructor, deserialization#22602randyquaye wants to merge 1 commit intonextfrom
randyquaye wants to merge 1 commit intonextfrom
Conversation
- byte_array.fuzzer.hpp: replace nullptr builder with static dummy_builder() to avoid null dereference on construction - calldata.fuzzer.cpp: wrap 4-limb FF constructor in uint256_t() to use the correct overload (FF has no 4x uint64_t constructor) - memory.fuzzer.cpp: same uint256_t() fix for FF construction - emit_public_log.fuzzer.cpp: same fix in two places (contract address and log value mutation) - ecc.fuzzer.cpp: uint256_t() fix for Fq constructor, plus try-catch guards around from_buffer() in both LLVMFuzzerCustomMutator and LLVMFuzzerTestOneInput to handle off-curve point deserialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fuzzing-containerandavm-fuzzing-containerdepend onFixes
byte_array.fuzzer.hppnullptrbuilder causes null derefdummy_builder()calldata.fuzzer.cppFF(u64,u64,u64,u64)— no such constructorFF(uint256_t(...))memory.fuzzer.cppFF(uint256_t(...))emit_public_log.fuzzer.cppFF(uint256_t(...))ecc.fuzzer.cppFq(u64,u64,u64,u64)+ off-curve point deser crashFq(uint256_t(...))+ try-catch aroundfrom_buffer()Test plan
cmake --preset fuzzing-avm && cmake --build build-fuzzing-avm --target harness_ecc_fuzzercompilescmake --preset fuzzing && cmake --build build-fuzzingcompiles (byte_array fix)