test(fuzz): seed multiplex frame header corpus (FCV-19.a)#4756
Merged
Conversation
908a54a to
b05dae2
Compare
2 tasks
d02fc8f to
dbfa7c1
Compare
Seed the libfuzzer corpus for multiplex_frame_parse so coverage-guided runs start from meaningful boundary conditions instead of empty input. Covers all 18 MSG_* tags from envelope::MessageCode, payload-length boundaries (0, 1, MAX-1, MAX), truncated headers (1/2/3 bytes), an oversized declared length with a too-short payload, invalid and unknown tag bytes (below MPLEX_BASE, gaps in the code range, 0xFF), and a valid-header-plus-trailing-garbage case so the streaming walker is exercised across frame boundaries.
dbfa7c1 to
8d8b1fe
Compare
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
multiplex_frame_parsetarget so coverage-guided runs start from meaningful boundary conditions instead of empty input.MSG_*tags fromenvelope::MessageCode, length boundaries (0, 1,MAX_PAYLOAD_LENGTH - 1,MAX_PAYLOAD_LENGTH), truncated headers (1/2/3 bytes), oversized declared length with too-short payload, invalid tags (belowMPLEX_BASE, gaps in the code range,0xFF), and a valid header followed by trailing garbage so the streaming walker is exercised across frame boundaries.tag = MPLEX_BASE(7) + code, with the 4-byte little-endian header(tag << 24) | (payload_len & 0x00FF_FFFF)as enforced byMessageHeader::from_raw.Test plan
cargo +nightly fuzz run multiplex_frame_parsepicks up the new corpus and reports the 39 seeds on startup.