urt-rs / docs /research /native /COVERAGE.md
nmarshall's picture
Reconcile native byte regions and trace authentication drop behavior
e678ca6
|
Raw History Blame Contribute Delete
2.76 kB

SDL text and Windows resource byte reconciliation

Static pass, 2026-10-11. Reproduce with python3 scripts/analyze_native_coverage.py; validate with python3 scripts/test_native_followup.py. Summary, SDL byte partition and Windows byte partition include source hashes and a hash for each segment. These reports cover two bounded regions, not entire binary files or behavior.

COV-001: SDL text outside debug-map functions

The 327,635-byte SDL __text section partitions into 327,111 bytes of paired STABS function ranges and 70 gaps totaling 524 bytes. Every gap consists entirely of the x86 single-byte NOP opcode 0x90; each gap's original bytes and SHA-256 are recorded. There are no unclassified bytes in this section's structural partition.

These runs are consistent with alignment padding. The classifier records the byte pattern without claiming intent or proving that no control-flow path executes them. This resolves the earlier unknown content of the 524 bytes; it does not finish per-function behavior analysis, source equivalence or the rest of the Mach-O image.

COV-002: Windows resource-region accounting

The client PE resource directory occupies 353,788 bytes. Exact accounting is 353,268 payload bytes plus 520 directory/entry/data-descriptor bytes. There are no unreferenced gaps in this region. The structural parser now optionally records byte ranges for directory headers/entries, UTF-16 names, data descriptors and leaf payloads; overlapping references count once in the partition.

The observed tree needs no named-string ranges. Each type/name/language variant remains a distinct resource leaf, even if future inputs share storage. This corrects the earlier possibility that the 520-byte difference included padding or unclassified data: all 520 bytes are now explained by resource-tree structures. It does not interpret the surplus bytes inside four icon payloads; those remain RE-217.

Method and limits

The interval partition rejects evidence outside the target region, splits at every range boundary, retains all covering labels, hashes each source segment and accounts for every byte exactly once. Gaps retain their bytes and are classified only by explicit byte patterns. Tests include overlapping ranges, uncovered zero bytes, invalid boundaries and exact reconstruction of both supplied regions. Changes to the underlying snapshot require new source hashes and regenerated evidence.

RE-218 is complete for its two named regions. Whole-file coverage reconciliation, SDL source matching, Windows icon alpha/mask interpretation and native loader metadata remain separate open tasks.