You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phase 6 row 2: cargo-fuzz targets for the message parser, filter parser, NIP-11 generator and settings loader #1286
The rewrite's four untrusted-input parsers have no fuzz target: the NIP-01 message parser, the filter (REQ) parser, the NIP-11 relay-information generator and the settings loader. Each is reachable from a socket or an env file, and each is hand-written, so a panic, a quadratic walk or an unbounded allocation in any of them is a relay-level denial of service that the current suite cannot see — its cases are the ones the author thought of.
Acceptance
A fuzz/ cargo-fuzz crate with one target per parser (four targets), each built against the workspace crate that owns the parser, not a copy.
Each target's corpus seeds at least the cases the unit tests already use, and each target documents the invariant it asserts (no panic; parse or a typed error; bounded work per byte).
cargo fuzz build succeeds for all four targets on the pinned toolchain, and each target runs for a stated short budget (say 60 s) locally and reports no finding, with the run recorded in the job's build.md.
Any crash or hang the short runs do find is fixed in the same PR with its regression case, or filed as its own issue with the input that reproduces it.
Round 2 passed both lenses at 3a9fbb15 (code after a rework, security which round 1's gate had held back). Security measured peak RSS at the 512 KiB bound (settings 495 MB, nip11 405 MB) and confirmed the runtime flags have 4× and 6.5× headroom; it also named two peer-reachable parsers with no target — nip44::validate_payload via gift-wrap and expiration::get_event_expiration — filed as #1293 rather than widened into this row.
Greptile's three P2s are all in: the payload bound now cites resources/default-settings.yaml:212 and every documented command uses 524288, with a wide pass at -len_control=0 that reached lim=524288 on all four targets and found nothing in the 128–512 KiB range; the settings harness owns a 0700 scratch directory it now also removes; filter.rs's comment names an input that actually takes the path.
Closed by 8488bf1 (#1289), merged 2026-11-30T00:02Z.
What landed: a fuzz/ cargo-fuzz crate with four targets over the parsers a socket reaches (client_frame, filter, settings, nip11 — the last through parse_relay_pubkey, since the NIP-11 generator itself takes typed Settings), 23 seeds, its own [workspace] and rust-toolchain.toml, and a committed lock; docs/rewrite/fuzz.md with measured numbers; three .gitignore rules; a fuzz/** CI path filter plus a crate-named fmt gate and a compile check; one changeset. The long campaign is written and stays gated on #871/tauceti.
Campaign evidence at the 512 KiB bound the shipped settings admit (resources/default-settings.yaml:212, network.maxPayloadSize: 524288): the wide pass at -len_control=0 reached lim=524288 on all four targets, tens to thousands of runs each, zero artifacts, no unit over a second. The plain 60 s pass never grows an input past ~4 KiB — the length controller crawls from the seeds — which is why both forms are documented.
Not covered, and filed as #1293: NIP-44's gift-wrap payload validation and the expiration tag parser, both peer-reachable, both measured total over bounded input.
Activity
chappie-daemon commentedon Nov 29, 2026
Job
043-fuzz-targetsopened: recon running, worktree cut frombb00f82e, estimate $1.45 (one-pass, no credential, no runtime surface).chappie-daemon commentedon Nov 29, 2026
Round 2 passed both lenses at
3a9fbb15(code after a rework, security which round 1's gate had held back). Security measured peak RSS at the 512 KiB bound (settings 495 MB, nip11 405 MB) and confirmed the runtime flags have 4× and 6.5× headroom; it also named two peer-reachable parsers with no target —nip44::validate_payloadvia gift-wrap andexpiration::get_event_expiration— filed as #1293 rather than widened into this row.Greptile's three P2s are all in: the payload bound now cites
resources/default-settings.yaml:212and every documented command uses 524288, with a wide pass at-len_control=0that reachedlim=524288on all four targets and found nothing in the 128–512 KiB range; the settings harness owns a 0700 scratch directory it now also removes;filter.rs's comment names an input that actually takes the path.feat(fuzz): a cargo-fuzz target per untrusted-input parser (#1289)
chappie-daemon commentedon Nov 30, 2026
Closed by 8488bf1 (#1289), merged 2026-11-30T00:02Z.
What landed: a
fuzz/cargo-fuzz crate with four targets over the parsers a socket reaches (client_frame,filter,settings,nip11— the last throughparse_relay_pubkey, since the NIP-11 generator itself takes typedSettings), 23 seeds, its own[workspace]andrust-toolchain.toml, and a committed lock;docs/rewrite/fuzz.mdwith measured numbers; three.gitignorerules; afuzz/**CI path filter plus a crate-named fmt gate and a compile check; one changeset. The long campaign is written and stays gated on #871/tauceti.Campaign evidence at the 512 KiB bound the shipped settings admit (
resources/default-settings.yaml:212,network.maxPayloadSize: 524288): the wide pass at-len_control=0reachedlim=524288on all four targets, tens to thousands of runs each, zero artifacts, no unit over a second. The plain 60 s pass never grows an input past ~4 KiB — the length controller crawls from the seeds — which is why both forms are documented.Not covered, and filed as #1293: NIP-44's gift-wrap payload validation and the expiration tag parser, both peer-reachable, both measured total over bounded input.