Validate PE relocation blocks #25

Manually merged
github merged 2 commits from github-bot/gh-25 into main 2026-11-26 20:10:20 +00:00 AGit
Owner

@⁠meshahid973 on GitHub · 2026-11-26 12:14 UTC · original
meshahid973:fix-relocation-bounds → main · +166 −31 · 1 files · 2 commits · merged 2026-11-26 20:00 UTC

Rejects the malformed relocation blocks, truncated data and overflowing RVAs. Includes regression tests.

Tested on Windows with cargo test -p victory-loader --locked. All 45 tests passed.

**@⁠meshahid973** on GitHub · 2026-11-26 12:14 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/25) `meshahid973:fix-relocation-bounds` → `main` · +166 −31 · 1 files · 2 commits · merged 2026-11-26 20:00 UTC Rejects the malformed relocation blocks, truncated data and overflowing RVAs. Includes regression tests. Tested on Windows with cargo test -p victory-loader --locked. All 45 tests passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 12:17:02 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-26 19:18 UTC · original

The checked arithmetic and block-boundary tests address the relocation parsing problem. This also changes which relocation directory layouts prepare accepts, so I want to check that the current title still reaches the start screen on this branch before merging.

**@⁠TaynanGT** on GitHub · 2026-11-26 19:18 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/25#issuecomment-7201445601) The checked arithmetic and block-boundary tests address the relocation parsing problem. This also changes which relocation directory layouts `prepare` accepts, so I want to check that the current title still reaches the start screen on this branch before merging.
github manually merged commit 146c9e029b into main 2026-11-26 20:10:20 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-26 20:01 UTC · original

Merged as 146c9e0 after Windows CI passed. The added regression covers a directory ending at the backed section boundary, including ABSOLUTE padding inside the block. I also checked the relocation metadata in the runtime binaries that carry TLS callbacks. The title executable uses that exact boundary case. The next Series S startup smoke test can verify the merged loader end to end.

**@⁠TaynanGT** on GitHub · 2026-11-26 20:01 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/25#issuecomment-7202205923) Merged as `146c9e0` after Windows CI passed. The added regression covers a directory ending at the backed section boundary, including ABSOLUTE padding inside the block. I also checked the relocation metadata in the runtime binaries that carry TLS callbacks. The title executable uses that exact boundary case. The next Series S startup smoke test can verify the merged loader end to end.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-26 20:05 UTC · original

Thanks for the section-boundary test, @⁠meshahid973. I ran all 55 loader tests on the merged commit 146c9e0, then used the Series S loader to prepare and map the actual title at a different address from its preferred base. The executable and four title DLLs bound successfully, with zero missing imports. This check stopped after binding, before the title’s entry point.

**@⁠TaynanGT** on GitHub · 2026-11-26 20:05 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/25#issuecomment-7202291835) Thanks for the section-boundary test, @⁠meshahid973. I ran all 55 loader tests on the merged commit `146c9e0`, then used the Series S loader to prepare and map the actual title at a different address from its preferred base. The executable and four title DLLs bound successfully, with zero missing imports. This check stopped after binding, before the title’s entry point.
This discussion has been locked. Commenting is limited to contributors.
No description provided.