Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleDefinition.ReadModule hangs permanently #555

Closed
Metalnem opened this issue Dec 24, 2018 · 2 comments
Closed

ModuleDefinition.ReadModule hangs permanently #555

Metalnem opened this issue Dec 24, 2018 · 2 comments

Comments

@Metalnem
Copy link

@Metalnem Metalnem commented Dec 24, 2018

ModuleDefinition.ReadModule hangs permanently when attempting to read the module from the attached archive. You can run the following code to reproduce it (the path variable should contain the path to the extracted file):

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

Found via SharpFuzz.

@rowandh
Copy link

@rowandh rowandh commented Jan 29, 2019

Nice find! This occurs because an entry in the assembly metadata TypeRef table of Test.dll is self-referencing. Specifically, entry 11 - DebuggingModes has a ResolutionScope of 0x2F (itself).

Cecil does not do any handling of recursive references and will enter an infinite loop while following the references.

@jbevain jbevain closed this in 34b49b4 Jan 31, 2019
@jbevain
Copy link
Owner

@jbevain jbevain commented Jan 31, 2019

Thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants