loader/crash: fix unwritable CLZERO fallthrough AV, page-boundary ove… #528
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!528
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-528"
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?
@pug205gti6 on GitHub · 2026-11-25 02:00 UTC · original
pug205gti6:pr/478-loader-crash→main· +144 −34 · 1 files · 1 commits · open…rreads, and thrown() NULL derefs
Fix three VEH / crash-reporter fault hazards in
crates/victory-loader/src/crash.rs:emulate_amd_only, verify the 64-byteclzerotarget line is committed and writable viaVirtualQuerybefore callingwrite_bytes(0, 64), so an unwritableclzerothatconsole_insn::emulaterejected does not fall through and trigger a nested Access Violation inside the VEH.room = 0x1000 - (Rip & 0xfff)) before inspecting[0x0f, 0x01, ...]orclwb_len, and pass the bounded slice&bytes[..n]into a safe slice-basedsse4a(&[u8], ...)so 1–6 byte illegal instructions at the end of a page adjacent to an unmapped/no-access page cannot fault while decoding.thrown(), handle MSVCthrow;rethrows (p[2] == 0 || p[3] == 0), guardrva(types) == 0/ zero catchable type count before callingname(0), and requirep[1] != 0before readingstd::exception's message pointer.Add synthetic unit tests for all three failure modes.
@Headache3318 on GitHub · 2026-11-25 09:22 UTC · original
Independent verification: PR #528 merges cleanly onto main, no conflicts. Build: success (8.61s). Tests: 253 passed, 1 failed (pre-existing Wine issue in victory-hle only_loopback_is_reachable test — confirmed failing on main without PR). PR modifies crates/victory-loader/src/crash.rs (144 insertions, 34 deletions) to fix CLZERO fallthrough AV, page-boundary overreads, and thrown() NULL derefs. No new build errors or test regressions. Machine: Arch Linux, kernel 7.3.5-arch1-1, 3x RTX 4090 driver 620.73.04, Proton, AI-assisted.
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.