Files
alksocks/fuzz
glm-5.3-flash db051dd068 release: v0.3.1 — the dependency-patch (alkcall 0.10.1 / alktunnels 0.4.1)
- alkcall 0.10.0 -> 0.10.1: the adoption-window ordering fix (review
  013, routed from alkgit's wave-2 gate) — install+park-drain is one
  atomic section in the channels demux; the fix surface is private
  upstream, no change on this crate's paths (relevant in principle to
  the bind-first adopt flow)
- alktunnels 0.4.0 -> 0.4.1: the dependency-patch ride, no
  API/wire change
- fuzz/shared harness alkcall pin bumped in lockstep
- doc pins: AGENTS.md convention 11, README (rides paragraph),
  overview.md dependency tree + feature table; CHANGELOG 0.3.1 entry

Verification: cargo test (145 passed), cargo test --all-features
(638 passed), fuzz corpus replay green, clippy (all-targets +
wasm32-unknown-unknown) -D warnings clean, cargo fmt --check clean,
wasm check green, cargo doc clean, publish dry-run clean
2026-10-22 06:33:12 +00:00
..

alksocks fuzzing

libFuzzer targets for alksocks' wire surfaces (see docs/research/fuzzing.md for the full rationale and campaign plan).

Layout

  • fuzz_targets/ — one binary per target; thin fuzz_target! wrappers.
  • shared/ — the invariant logic, as a plain library so normal cargo test (stable toolchain) can replay the committed corpora through the same invariants (fuzz/shared/src/*.rs #[cfg(test)] modules; quinn's CI pattern). The fuzz binaries are nightly-only; the shared crate is stable-clean.
  • corpus/<target>/ — committed hand-made seeds (regenerate with python3 fuzz/gen_fuzz_seeds.py from the repo root). Grown corpora and artifacts are gitignored.
  • run-detached.sh — mandatory runner for agent sessions: wraps cargo fuzz run in setsid + nohup + log redirection so an OOM in a target can never take down the agent host (research doc §5).
  • json.dict — JSON token dictionary for the params target.

Targets

Target Drives Invariants
datagram_codec DatagramReader::feed / frame / frame_inner (src/wire.rs) no-panic; infallible reassembly with the decode-error partition; empty-payload F-2 layering; bad-ATYP loudness; splitting transparency; round-trips; the joint bound (incl. the 65766 shape); the decoder-state retained-bytes bound
rfc1928_codec the forked RFC 1928 core (src/rfc1928/): read_address, the server typestate handshake, the RFC 1929 sub-handshake, the RFC UDP header codec, ReplyError::from_u8 no-panic on any byte sequence, both protocol directions; typed failures only (the F-1 class); round-trips; the full-domain reply table
params_parse Socks5Params / socks5_open_spec() / the reason surface (src/params.rs) no-panic; the trivial-params pin; the spec is a constant (the wire-stable ADR-001 surface + the schema/typed-view drift guard); the pass-through reason-extraction posture

Commands

cargo fuzz build and cargo fuzz run must be executed with fuzz/ (or deeper) as the working directory so rustup selects the pinned nightly toolchain — the detached runner handles that itself.

# build (nightly, pinned by rust-toolchain.toml inside fuzz/; run from fuzz/)
cargo fuzz build

# agent sessions: detached campaign (never foreground; CWD-independent)
FUZZ_RUNTIME_SECS=600 fuzz/run-detached.sh datagram_codec -max_len=65536
FUZZ_RUNTIME_SECS=600 fuzz/run-detached.sh rfc1928_codec -max_len=4096 -use_value_profile=1
FUZZ_RUNTIME_SECS=600 fuzz/run-detached.sh params_parse -dict=json.dict -use_value_profile=1

# corpus replay through the invariants (stable toolchain, no nightly)
cargo test --manifest-path fuzz/shared/Cargo.toml

# coverage
cargo fuzz coverage <target>

The fuzz workspace is excluded from the main workspace and from the published package (exclude in the root Cargo.toml); it pins its own nightly toolchain via rust-toolchain.toml and does not affect the crate's stable MSRV.