Skip to content

test(fuzz): seed multiplex frame header corpus (FCV-19.a)#4756

Merged
oferchen merged 1 commit into
masterfrom
test/fcv-19a-multiplex-seeds
May 22, 2026
Merged

test(fuzz): seed multiplex frame header corpus (FCV-19.a)#4756
oferchen merged 1 commit into
masterfrom
test/fcv-19a-multiplex-seeds

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Seed the libfuzzer corpus for the multiplex_frame_parse target so coverage-guided runs start from meaningful boundary conditions instead of empty input.
  • 39 seed files covering all 18 MSG_* tags from envelope::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 (below MPLEX_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 byte encoding follows tag = MPLEX_BASE(7) + code, with the 4-byte little-endian header (tag << 24) | (payload_len & 0x00FF_FFFF) as enforced by MessageHeader::from_raw.

Test plan

  • CI: fmt + clippy
  • CI: nextest (stable)
  • CI: Windows / macOS / Linux musl
  • Optional follow-up: cargo +nightly fuzz run multiplex_frame_parse picks up the new corpus and reports the 39 seeds on startup.

@github-actions github-actions Bot added the test label May 22, 2026
@oferchen oferchen force-pushed the test/fcv-19a-multiplex-seeds branch from 908a54a to b05dae2 Compare May 22, 2026 21:15
@oferchen oferchen mentioned this pull request May 22, 2026
2 tasks
@oferchen oferchen force-pushed the test/fcv-19a-multiplex-seeds branch 4 times, most recently from d02fc8f to dbfa7c1 Compare May 22, 2026 22:16
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.
@oferchen oferchen force-pushed the test/fcv-19a-multiplex-seeds branch from dbfa7c1 to 8d8b1fe Compare May 22, 2026 22:40
@oferchen oferchen merged commit c7058f3 into master May 22, 2026
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant