Files
alksocks/fuzz
glm-5.3-flash 9ed3e8c83d release: v0.2.0 — the dependency-major (alkcall 0.9.0 / alktunnels 0.3.0)
- Cargo.toml: alkcall 0.8.1 -> 0.9.0 (crates.io, the stub-sweep
  release) and alktunnels 0.2.1 -> 0.3.0 (its dependency-major ride);
  0.1.0 -> 0.2.0 (semver-incompatible dep bumps + public alkcall
  re-exports -> minor, matching the alktunnels 0.2.1 -> 0.3.0 ride)
- fuzz/shared/Cargo.toml: alkcall 0.9.0 (one alkcall version across
  the path graph)
- No code change: zero contact with the 0.9.0 breaking surface (no
  marked-pub registration, no control-handle subscription, no
  resource enumerator use, no generic op/register announcements;
  Establishment::default() is the only Establishment contact, in the
  session gate)
- CHANGELOG: 0.2.0 section + compare links
- README: the 0.2.0 note
- docs/architecture/overview.md: dep tree + feature table alkcall
  0.9.0 / alktunnels 0.3.0
- AGENTS.md: alkcall refs — v0.8.x/0.8.0 pin -> v0.9.x/0.9.0

Verification: cargo test (145 default / 171 all-features), fuzz/shared
corpus replay (3/3), clippy --all-targets -D warnings (native +
wasm32-unknown-unknown), fmt --check, wasm32 check, cargo doc, and
cargo publish --dry-run --allow-dirty all green
2026-10-14 05:33:44 +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.