mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-03 21:30:35 +00:00
SabreTools.Serialization.Deserializers.PortableExecutable.ParseBaseRelocationTable can time out on large enough relocation tables, causing an otherwise valid and fully read executable to fail to give any info #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Originally created by @HeroponRikiBestest on GitHub (Jun 28, 2025).
On an executable with a large enough relocation table, InfoPrint will time out and completely fail to parse an executable it otherwise might. On this particular example, the .reloc section is fairly large, and only increments about 122 bytes at a time, from starting position 3829760 to endOffset 3985408. I can get through it in a debugger if I disable "Allow property evaluations and other implicit function calls" entirely or just jack up the evaluation timeout; or, if I simply comment out the part of https://github.com/SabreTools/SabreTools.Serialization/blob/main/SabreTools.Serialization/Deserializers/PortableExecutable.cs that calls for this check at
d3e61b42dd/SabreTools.Serialization/Deserializers/PortableExecutable.cs (L156).Regardless of the proper solution, I would imagine it might be good to have a try-catch here, since if it fails, I'd imagine it would be best if it still returns the rest of the executable info. I don't know how you'd feel about that, though.
Simply running as normal:
Running with that check commented out:
InfoPrint.log
Sample:
game.exe from http://redump.org/disc/125414/ http://redump.org/disc/125415/