Loading an assembly causes ModuleDefinition.ReadModule to crash the process with a StackOverflowException. #971

Open
opened 2025-05-21 15:16:46 -05:00 by AdvDebug · 0 comments
AdvDebug commented 2025-05-21 15:16:46 -05:00 (Migrated from github.com)

Hey, i found an issue when parsing with ModuleDefinition.ReadModule using
this assembly which causes the parser to throw StackOverflowException which will also cause the whole process to crash.

you can reproduce the same issue by doing this:

  1. Extract the zip file and get the dll inside

  2. Try to parse the assembly with the following code:

ModuleDefinition.ReadModule(path_to_dll, new ReaderParameters(ReadingMode.Immediate));

and the process will crash.

Found via BinarySploit Framework, the fuzzing component. (A project i'm still working on)

Hey, i found an issue when parsing with `ModuleDefinition.ReadModule` using [this](https://github.com/user-attachments/files/20374695/StackOverflowException.zip) assembly which causes the parser to throw StackOverflowException which will also cause the whole process to crash. you can reproduce the same issue by doing this: 1. Extract the zip file and get the dll inside 2. Try to parse the assembly with the following code: ```csharp ModuleDefinition.ReadModule(path_to_dll, new ReaderParameters(ReadingMode.Immediate)); ``` and the process will crash. Found via BinarySploit Framework, the fuzzing component. (A project i'm still working on)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-jbevain/cecil#971
No description provided.