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

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 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
Copy link
Owner

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
Development

No branches or pull requests

3 participants