Skip to content

test(checksums): cargo-fuzz target for SIMD vs scalar parity (rolling + MD4/MD5) - #4101

Merged
oferchen merged 1 commit into
masterfrom
test/simd-checksum-fuzz-target-2103
May 15, 2026
Merged

oferchen merged 1 commit into
masterfrom
test/simd-checksum-fuzz-target-2103

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds simd_checksum_parity to the top-level fuzz/ cargo-fuzz harness.
  • Each libFuzzer input is fed to every runtime-selected SIMD checksum
    dispatcher and compared against an independent scalar reference:
    • RollingChecksum::update (AVX2/SSE2/NEON) vs the per-byte update_byte
      path, which never engages the SIMD accumulator.
    • strong::md5_digest_batch (AVX-512/AVX2/SSE4.1/SSSE3/SSE2/NEON) vs the
      RustCrypto-backed strong::Md5::digest.
    • strong::md4_digest_batch (same backend matrix) vs strong::Md4::digest.
  • The on-tree checksums::run_simd_self_test already cross-checks the same
    dispatchers, but only over a fixed input sweep. This target uses
    coverage-guided fuzzing to hunt for shapes the sweep does not cover (odd
    remainders past SIMD lane boundaries, repeated byte patterns, adversarial
    transitions across MD4/MD5 block boundaries).
  • Batches submit 17 copies of the input so the dispatcher exercises both full
    and partial lane handling regardless of active backend (AVX-512 = 16, AVX2
    = 8, SSE2/NEON = 4 lanes).

Refs #2103.

Test plan

  • cargo +nightly fuzz build --fuzz-dir fuzz (verifies the new target
    compiles against the existing libfuzzer-sys gate).
  • cargo +nightly fuzz run simd_checksum_parity -- -max_total_time=60
    smoke run on a tier-1 host; no panics expected.

Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands
arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher
(RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch)
and asserts each result matches an independent scalar reference. The on-tree
run_simd_self_test sweeps a fixed input set; this target uses
coverage-guided fuzzing to reach shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
MD4/MD5 block-boundary transitions).

Refs #2103.
@github-actions github-actions Bot added the test label May 15, 2026
@oferchen
oferchen merged commit 16e7a22 into master May 15, 2026
3 checks passed
@oferchen
oferchen deleted the test/simd-checksum-fuzz-target-2103 branch May 16, 2026 19:50
oferchen added a commit that referenced this pull request May 18, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands
arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher
(RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch)
and asserts each result matches an independent scalar reference. The on-tree
run_simd_self_test sweeps a fixed input set; this target uses
coverage-guided fuzzing to reach shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
MD4/MD5 block-boundary transitions).

Refs #2103.
oferchen added a commit that referenced this pull request May 18, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands
arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher
(RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch)
and asserts each result matches an independent scalar reference. The on-tree
run_simd_self_test sweeps a fixed input set; this target uses
coverage-guided fuzzing to reach shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
MD4/MD5 block-boundary transitions).

Refs #2103.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands
arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher
(RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch)
and asserts each result matches an independent scalar reference. The on-tree
run_simd_self_test sweeps a fixed input set; this target uses
coverage-guided fuzzing to reach shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
MD4/MD5 block-boundary transitions).

Refs #2103.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands
arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher
(RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch)
and asserts each result matches an independent scalar reference. The on-tree
run_simd_self_test sweeps a fixed input set; this target uses
coverage-guided fuzzing to reach shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
MD4/MD5 block-boundary transitions).

Refs #2103.
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