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

Open
opened 2026-01-29 21:16:26 +00:00 by claunia · 0 comments
Owner

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:

InfoPrint game.exe 
Checking possible path: game.exe
Attempting to print info for game.exe
File format found: Executable
Either Executable is not supported or something went wrong during parsing!

Running with that check commented out:

InfoPrint.log

Sample:
game.exe from http://redump.org/disc/125414/ http://redump.org/disc/125415/

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 https://github.com/SabreTools/SabreTools.Serialization/blob/d3e61b42dd41c7d43496a0dde7e57be7accd32f7/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: ``` InfoPrint game.exe Checking possible path: game.exe Attempting to print info for game.exe File format found: Executable Either Executable is not supported or something went wrong during parsing! ``` Running with that check commented out: [InfoPrint.log](https://github.com/user-attachments/files/20958771/InfoPrint.log) Sample: [game.exe](https://github.com/user-attachments/files/20958766/game.zip) from http://redump.org/disc/125414/ http://redump.org/disc/125415/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/SabreTools.Serialization#6