code wiki / _hdl_build / nx_cms_fuzz_gate.nx

nx_cms_fuzz_gate.nx

buildroot/runtime/_hdl_build/nx_cms_fuzz_gate.nx

11887 B276 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_fuzz_gate.nx -- C6b SECURITY GATE (the Engineer/Auditor's adversarial instrument). The CMS editor is the ONLY untrusted-input surface (spec rule 12); this gate ATTACKS the real running daemon with hostile HTTP and proves it degrades gracefully (rule 14): never crashes, never reflects an injected response header, never serves a route that should not exist, and is STILL ALIVE after the barrage (a clean GET / succeeds at the end). Boots its OWN nx_cms_admin via nx_sov_build_run (prove- all: /tmp is contested), plays the attacks with the team's own HTTP client, appends a row=nx_cms_fuzz verdict=PASS|FAIL line to knowledge/status/cms_gate.log so the arc board routes on it. Exit 0 iff all attacks contained. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_kill_portable.nx nx_cms_fuzz_gate.nx

imports: nx_syscalls.nxnx_connect.nxnx_kill_portable.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cf_mkdir sys_mmap cf_copy sys_openat_rd sys_openat_wr sys_close sys_mmap ↻ sys_read sys_write sys_openat_wr ↻ sys_write ↻ sys_close ↻ sys_fork sys_dup3 sys_mmap ↻ sys_execve sys_exit sys_wait4 sys_openat_rd ↻ cf_w sys_write ↻ cf_alive sys_mmap ↻ cf_cat cf_send sys_socket sys_mmap ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ sys_write ↻ sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap sys_read ↻

structs

none

consts

13const CF_PORT: i64 = 8078
14const CF_SITE: *u8 = "/tmp/_cms_fuzz_site"

functions

16func cf_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: cf_rowmain calls 1: sys_write
17func cf_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: cf_index
18func cf_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 2: cf_alivemain
24func cf_index(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: cf_has calls 1: cf_len
36func cf_has(hay: *u8, n: i64, needle: *u8) -> i64 { if cf_index(hay, n, needle) >= 0 { return 1 } return 0 }
called by 3: cf_alivecf_no_5xxmain calls 1: cf_index
38func cf_mkdir(path: *u8, mode: i64) -> i64
called by 1: main calls 1: sys_mmap
43func cf_copy(src: *u8, dst: *u8) -> i64
60func cf_send(raw: *u8, rl: i64, resp: *u8, cap: i64) -> i64
95func cf_alive(resp: *u8, cap: i64) -> i64
called by 1: main calls 4: sys_mmapcf_catcf_sendcf_has
107func cf_no_5xx(resp: *u8, rn: i64) -> i64
called by 1: main calls 1: cf_has
115func cf_row(id: i64, ok: i64, what: *u8) -> i64
called by 1: main calls 2: cf_wsys_mmap
125func main() -> i64