Repository navigation
fix(pe): reject misaligned certificate table offsets - #9276
Merged
morluto merged 3 commits intoNov 7, 2026
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryRejects certificate tables whose file offsets are not aligned to eight bytes, before decoding any entries.
Reviews (1) · Last reviewed commit: "style: format ghidra limitation assertio..." · Reviewed by Greptile |
ShuaixinHuang
marked this pull request as ready for review
November 7, 2026 12:37
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 7, 2026
This was referenced Nov 7, 2026
This was referenced Nov 8, 2026
3 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PE signing inspection rounded entry offsets relative to the table but accepted a misaligned table start. Moving an otherwise unchanged certificate table from file offset 0x200 to 0x201 still produced a complete report. Reject misaligned table starts before decoding entries, as required by the PE attribute certificate table layout.
The existing parser owns the rejection and the shared format-error path serves CLI and MCP. No signature verification, input or output schema, or provider capability change.
Validation
The PE32 and PE32+ regressions failed on main
8eff65127. Both now reject the shifted table and still parse their aligned controls. All 54 certificate parser tests passed. Targeted formatting and whitespace checks passed. Lint reported parser complexity and length advisories. No live signature verification or CLI/MCP end-to-end run.Author readiness
Human owner: @ShuaixinHuang