PE loader: reject unreadable export forwarders #1134
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1134
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1134"
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?
@anakatt on GitHub · 2026-11-24 12:18 UTC · original
anakatt:pe/reject-unreadable-forwarders→main· +35 −1 · 1 files · 1 commits · openI reject an unreadable PE export forwarder instead of treating its RVA as an ordinary export address. Previously, a missing string terminator caused the forwarder data's address to enter the owned export tables.
What is in it
pe.rs: propagate a failed forwarder-string read asNone, with a contract comment.OwnedExportslookups.Tested
I ran debug tests on Windows 11 Pro ARM64 10.0.26100.1742 in UTM (4 GiB RAM, virtual
virt-10.0CPU, Red Hat VirtIO GPU DOD), using Rust 1.100.0x86_64-pc-windows-msvcand Visual Studio 2022 Build Tools. The guest used main47efa2ecea0a12934719ae69b81930cf02a4b1c3plus the source changes committed asaeb5ca72aa4b6f7fc4ecaad2c8225c1dff59e6e7.cargo test --locked -p xcl --lib pe::tests::unterminated_forwarders_are_not_export_addresses -- --exact:Some(Rva(4156))instead ofNone.SKIPPEDoutput.Not tested
I have not run the full workspace suite, native x64 Windows hardware, D3D12 GPU execution or a real game title. This verifies PE parsing and owned export lookup, not loading a malformed DLL into a game process.
Regression run
Not run. This remains a draft pending the required real-title
xcl-smokeblocks from main and this PR's clean head, using the same title and duration.AI use
I used omp (
openai-codex/gpt-6-astra) to investigate, implement the fix and regression, run the Windows test, and prepare this PR.@eizispark on GitHub · 2026-11-24 12:41 UTC · original
Hardware test report — commit
aeb5ca7Verified clean merge with
main(47efa2e) onaeb5ca72aa4b6f7fc4ecaad2c8225c1dff59e6e7: pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace --no-fail-fast -- --test-threads=4:742 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none), includingpe::tests::unterminated_forwarders_are_not_export_addressesand all 11pe::testsRegression run
main(47efa2e):PR (
aeb5ca7):Not tested
XCL_D3D12_DEBUG=1; gameplay past the menusAI use: Antigravity (Google DeepMind), Gemini (exact version string not exposed in runtime environment) — ran the workspace test suite and 60 s retail smoke check on the hardware above and formatted this report.
@JoaoPauluu on GitHub · 2026-11-24 14:35 UTC · original
A run on Linux under Wine.
Tested
x86_64-pc-windows-gnu.aeb5ca7as it is (based on47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).pe::tests::unterminated_forwarders_are_not_export_addresses: ok, no SKIPPED.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 08:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.