code wiki / _hdl_build / nx_pbkdf2_leak_probe.nx
nx_pbkdf2_leak_probe.nx
buildroot/runtime/_hdl_build/nx_pbkdf2_leak_probe.nx
about
nx_pbkdf2_leak_probe.nx -- BOUNDED VERIFICATION THAT THE PBKDF2 mmap LEAK IS ACTUALLY FIXED.
WHY A PROBE AND NOT THE FULL RFC 6070 VECTOR: vector 4 is c = 16,777,216. Before the fix that leaked
~16 KB/iteration (MEASURED: 11.3 GB resident, 3.18M pagefaults, 5.62s user vs 405.88s system, ~4%
complete in 10m39s => ~260 GB and ~4h to finish). It also destabilised the WSL VM twice. Re-running it
to prove a fix would take hours and risks the same collateral.
So this probe runs a FIXED, SMALLER count and lets ARITHMETIC do the rest. The pre-fix rate is known and
measured, so the prediction is exact and falsifiable:
c = 1,000,000 -> PRE-FIX ~16 GB resident (1e6 x 16 KB)
POST-FIX a few MB, FLAT, independent of c
A 1000x separation cannot be explained by noise, so one run decides it.
★★★★★A FIX IS NOT VERIFIED BY THE ABSENCE OF THE OLD SYMPTOM -- IT IS VERIFIED BY A NUMBER THAT MOVED IN
THE PREDICTED DIRECTION BY THE PREDICTED MAGNITUDE. "It didn't hang this time" would be worthless here;
maxresident is the instrument.
⚠THIS PROBE MAKES NO CORRECTNESS CLAIM. It says nothing about whether the derived key is right -- that is
nx_pbkdf2sha1_extvec_gate's job against RFC 6070 (vectors 1-3 PASS). ★A PERFORMANCE PROBE THAT ALSO
CLAIMED CORRECTNESS WOULD BE TWO INSTRUMENTS IN A TRENCHCOAT. Run under: time ./elf
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_pbkdf2_sha1.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
| 24 | func w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 26 | func nn(v: i64) -> i64 |
| 42 | func rss_pages() -> i64 |
| 69 | func main() -> i64 |