Correctly limit PE debug symbols#9174
Open
XOR-RAX wants to merge 1 commit into
Open
Conversation
mumbel
reviewed
May 11, 2026
| if (symbolTableOffset == 0) { | ||
| return; | ||
| } | ||
| if (numberOfSymbols < 0) { |
Contributor
There was a problem hiding this comment.
unless I'm missing it in the diff, is this PR really just not a +1/-1 here for this logic:
if (numberOfSymbols < NTHeader.MAX_SANE_COUNT) {
-if (numberOfSymbols < 0) {
+if (numberOfSymbols < 0 || numberOfSymbols >= NTHeader.MAX_SANE_COUNT) {
Author
There was a problem hiding this comment.
I think you are right. I will check as soon as I have time.
CryptoJones
added a commit
to CryptoJones/GayHydra
that referenced
this pull request
May 21, 2026
… debug symbols (#131) Cherry-picked from NationalSecurityAgency#9174 (closes upstream issue NationalSecurityAgency#9168). Original commit: NSA/ghidra@2c0c26f35d82563d4b2fef999314a4f7ce1e5577 Original author: XOR-RAX <XOR-RAX@outlook.com> Co-authored-by: XOR-RAX <XOR-RAX@outlook.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
This patch limits PE debug symbols, thus fixes #9168