Proof of concept mechanical port of ircnet/ircd to Rust as part of a bit about C being insecure for network services
0

Configure Feed

Select the types of activity you want to include in your feed.

ircd.rs / docs / claude-memory / leveva-hunt-server-proptest-hazard.md
1.9 kB

name: leveva-hunt-server-proptest-hazard description: "leveva proptests that feed arbitrary args to hunt_server verbs must model unknown-target→402, or they fail stochastically" metadata: node_type: memory type: project originSessionId: 036bae10-89b0-45d2-a02f-0e606bafe22f#

In leveva, the server-info/query verbs VERSION, TIME, ADMIN, INFO, LUSERS, USERS, MOTD, STATS, LINKS, TRACE take a hunt_server <target> argument (added incrementally in P11 slices 101/107/109/110). An arg that does not glob-match the local server name → the handler short-circuits to 402 ERR_NOSUCHSERVER, NOT the verb's normal reply.

  • LINKS: parv[1] is the target (2nd of two tokens); a lone token is the mask.
  • STATS: parv[1] is the target (after the query letter).
  • TIME/USERS/etc.: parv[0] is the target.
  • MAP does not hunt (always terminates with 017).

Why: a proptest feeding arbitrary args (args_strat, [ -~]{0,40}, multi-token vecs) to these verbs and asserting "exactly one terminator numeric" will fail stochastically — only when proptest happens to generate a target-shaped arg. Five such proptests (help_users, links_map, server_query, server_topology, stats) were left stale by 101/107/109 and only surfaced under thorough multi-run fuzzing (slice 113). They drive dispatch/feed directly, so the failures are unrelated to any framer/session change.

How to apply: when fuzzing one of these verbs with non-empty args, model the target: if !matching::matches(&target, SERVER) { assert == ["402"] } else { normal-reply }. For a panic-freedom test, add "402" to the allowed numeric set. Run the proptest several times (seeds are written to tests/<name>.proptest-regressions) before trusting it green. The standing testing rules: [[leveva-slice-recording]], [[leveva-native-oracle-harness]].