Validate DXContainers and mapped PE section bounds in call_evidence #131
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!131
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/131/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@alexander-src on GitHub · 2026-11-21 16:47 UTC · original
alexander-src:fix/call-evidence-dxcontainer-validation→main· +107 −28 · 2 files · 3 commits · merged 2026-11-21 17:46 UTCChange
Align
tools/call_evidence.py'sshader_containers()withtools/resource_inventory.py's DXContainer validation rules (commitsfadc3cdande69639d) and require mapped PE section extents before recording a container or size/pointer pair:resource_inventory.parts()instead of the duplicate ascending-offset loop so valid DXContainers with unordered part-offset tables are indexed (and theirRTS0root header extracted) while containers with overlapping physical parts or duplicate FourCC tags are rejected before they can breaktools/probe_roots.py.pe.get_rva_from_offset()calls with_mapped_rva(pe, offset, length)backed bype.get_section_by_offset(), skipping containers or(size, pointer)pairs that fall in unmapped PE overlays, headers, zero-PointerToRawDatasections, or cross past section bounds instead of raisingTypeErrorwhenget_rva_from_offset()returnsNone(or returning bogus header RVAs on small overlays below the first section'sVirtualAddress).tests/dxcontainer_part_offsets_check.pyexercising unordered directories with anRTS0header, duplicate FourCC rejection, overlapping part rejection, and unmapped overlays at both< 0x1000and> 0x1000file offsets.Verification
Tested on Linux x86_64 (
Python 3.14,pefile) at commit2a3f6ec(based onfd1ff2a):python3 -B tests/dxcontainer_part_offsets_check.py -v: 5 tests passed (includingtest_call_evidence_matches_dxcontainer_rules_and_skips_unmapped_bytesfor both0x200and0x1200section sizes).python3 -B tests/script_state_check.py: 3 tests passed.python3 -B tests/bcpack_check.py: 3 tests passed.python3 -B tests/resource_ranges_check.py: 3 tests passed.python3 -B tests/layout_chunks_check.py: passed (layout chunk summary ok).python3 -B tests/intake/paths_check.py: passed.Evidence and follow-up
All new test inputs are synthetic byte buffers generated in
tests/dxcontainer_part_offsets_check.py(original MIT-licensed code, no third-party binaries or game assets).The Windows C++ build and
dumpbininvocation path incall_evidence.inspect()were not run locally on Linux and remain covered by Windows CI.AI-assisted: yes.