loader/crash: fix unwritable CLZERO fallthrough AV, page-boundary ove… #528
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by pug205gti6 on 2026-11-25T02:00:01Z.
…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.
Imported from fxceless/victory-fork. Originally posted by Headache3318 on 2026-11-25T09:22:16Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.