nx_ownership_dfree.nx
buildroot/runtime/nx_ownership_dfree.nx
about
nx_ownership_dfree.nx -- the DOUBLE-FREE witness for LN5 (nx_ownership_gate).
There is no separate double-free rule in this rung, and that is the point: the second sys_munmap
has to READ the name to pass it, and that read is the use-after-release the one checker already
refuses. CWE-415 falls out of CWE-416 for free, and a fixture is the only way to say so honestly
rather than claim it in a comment.
Under the default this compiles and runs exit 0 -- 64 bytes is below NXA_SMALL_MAX, so BOTH
releases are arena no-ops and the double free is completely invisible at runtime today.
license_tier: ORIGINAL No hw writes (Rule 26).
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
| 12 | const OWN_DF_BYTES: i64 = 64 |
| 13 | const OWN_DF_MARK: i64 = 13 |
functions
| 15 | func own_double_free(seed: i64) -> i64 |
| 24 | func main(argc: i64, argv: *i64) -> i64 calls 1: own_double_free |