Skip to content

matter_roundtrip has no AFL/CMPLOG counterpart — one fuzz target gets no cross-engine cross-pollination #101

Description

@joeldsouzax

Context

Noted during the #80 review (PR #99). Minor / by-design gap, filed for tracking.

Situation

Of the 13 fuzz targets, matter_roundtrip is the only one that runs libFuzzer-only (deep-fuzz) with no AFL++/CMPLOG counterpart in deep-fuzz-afl. Reason: it uses bolero's structured [u8; 32] generator (construct Ed25519N Matter → encode → decode → assert raw-byte stability), which does not fit afl.rs's raw &[u8] byte-stream model, so it was deliberately left out of fuzz-common and the AFL harness in #80.

Consequences:

  • matter_roundtrip gets no CMPLOG comparison coverage — only value-profile.
  • Its corpus never cross-pollinates with an AFL leg (there is none). The deep-fuzz restore step harmlessly attempts to download corpus-afl-matter_roundtrip (guarded by || true), which never exists.

Is this worth fixing?

The encode→decode round-trip invariant is what matter_roundtrip guards; CMPLOG's strength (getting past verbatim decode gates on adversarial bytes) adds little to a self-constructed round-trip. So the gap may be acceptable as-is. Options if we want coverage parity:

  • Byte-slice adaptation: an AFL bin that takes the first 32 bytes of &[u8] as the raw and runs the same round-trip. Loses bolero's guaranteed-32-bytes-every-iteration property (short inputs early-return, wasting iterations) but gives CMPLOG a shot at the decode leg.
  • Accept and document: keep matter_roundtrip bolero-only; remove the dead corpus-afl-matter_roundtrip restore attempt from the deep-fuzz job for that target (or leave the harmless || true).

Acceptance

Decide between adding an AFL byte-slice variant vs. documenting the intentional bolero-only status; if the latter, tidy the no-op AFL corpus restore for this target.

Pointers

  • fuzz/tests/matter.rsmatter_roundtrip (structured [u8; 32]).
  • .github/workflows/fuzz.ymldeep-fuzz matrix includes matter_roundtrip; deep-fuzz-afl matrix does not.
  • Design rationale: docs/superpowers/specs/2026-07-05-80-cmplog-afl-harness-design.md (Target set).

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTest harnesses, fuzzing, differential testing

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions