code wiki / _hdl_build / _bs_poison.nx
_bs_poison.nx
buildroot/runtime/_hdl_build/_bs_poison.nx
about
_bs_poison.nx -- R1-T1-004 / X-CLEAN-002 the "next reproducer": try to make the LATENT nxasm
rc=6 uninit-read DETERMINISTIC by POISONING the child's inherited context. R1-T1-004 pinned the
class as parent-ctx x output-path (uninit-read in nxasm, value=parent-residue, relevance=path-slot)
but the trigger went latent (fresh /tmp, residue gone). This probe floods the nxasm child's
inherited ENVIRONMENT (the parent-controlled bytes that survive execve) with several poison
patterns x sizes, plus a 1MB poison scratch fill, and assembles ONE real .s to a genuinely
WRITABLE output path under each config. CONTROL = clean env (must rc=0). If ANY poison config
makes a WRITABLE path fail (rc!=0), the uninit-read picked up poison -> DETERMINISTIC TRIGGER
FOUND (then bisect nxasm). If all stay rc=0, the defect is not reachable via this vector
(strengthens latent/non-reproducible -> no-overclaim close). Pure diagnostic; NO nxasm edits.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| none |
functions
| 14 | func bp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 15 | func bp_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 } |
| 18 | func bp_run(path: *u8, argv: *i64, envp: *i64) -> i64 |
| 31 | func bp_try(asm_tool: *u8, spath: *u8, outpath: *u8, envp: *i64) -> i64 |
| 38 | func bp_poison_env(pattern: i64, count: i64, slen: i64) -> *i64 |
| 56 | func main() -> i64 |