code wiki / _hdl_build / nx_vc_fecrx_fuzz_gate.nx
nx_vc_fecrx_fuzz_gate.nx
buildroot/runtime/_hdl_build/nx_vc_fecrx_fuzz_gate.nx
about
nx_vc_fecrx_fuzz_gate.nx -- ADVERSARIAL memory-safety proof for vc_fecrx_add, the FEC reassembly parser
on the LIVE family-video path (operator: "s class exceed ... permanent gains require pain"). Every shard
header field (block_id/idx/k/m/flen) is ATTACKER-CONTROLLED (a peer's bytes over the content-blind relay).
A green build shipping an exploitable parse is worse than none -> this PROVES no hostile shard can write
outside the caller regions. Method: allocate st/scratchA/scratchSh/out at the EXACT deployed-client sizes,
wrap each in 0xAA CANARY guard bands, throw 60000 hostile inputs + boundary cases + a real accumulate,
and assert EVERY guard byte is pristine after EVERY call. NEG-control proves the detector isn't tautological
(a deliberate guard poke MUST read as breached). Evidence -> knowledge/status/vc_fecrx_fuzz.log.
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_video_client_wasm.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const GUARD: i64 = 8192 |
| 14 | const USABLE: i64 = 65536 // the deployed client's per-region size (0x10000 slots) |
| 15 | const OUTCAP: i64 = 65280 // the client passes B(0xFF00); n*S bound -> S<=6528, flen<=52224 |
functions
| 17 | func fp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func fn(v: i64) -> i64 |
| 22 | func lcg(s: *i64) -> i64 { s[0]=(s[0]*1103515245+12345) & 0x7fffffff; return s[0] } called by 1: main |
| 26 | func galloc(usable: i64, g: *i64) -> i64 |
| 40 | func gok(g: *i64) -> i64 called by 1: main |
| 48 | func main() -> i64 |