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

Nested types metadata/references lost using DynamicMethodDefinition. #363

Closed
NullOnSec opened this issue Oct 9, 2022 · 1 comment
Closed
Labels
bug dotnet Issues related to AsmResolver.DotNet

Comments

@NullOnSec
Copy link

AsmResolver Version

4.11.2

.NET Version

.net 4.7.2

Operating System

Windows

Describe the Bug

Problems with nested types references when patching a new net assembly from DynamicMethodDefinitions.

How To Reproduce

DISCLAIMER: I will not be posting screenshots because the way of reproducing it is patching the FlareOn nº8 challenge, since FlareOn9 is not finished yet I will not be making any spoilers, anyways, I believe @Washi1337 knows what I'm talking about.

To reproduce this error all I did was patch the flared_48 method and I lost nested types references, the code I used for this is the following:
SS1
SS2

Expected Behavior

As I said I won't post screenshots of this because I'd leak flareOn stuff.

Essentially the problem is that nested types metadata/references should be preserved but actually it gets lost.

Actual Behavior

Nested types metadata/references are lost.

Additional Context

No response

@Washi1337
Copy link
Owner

Thanks for reporting. It seems like this is a repetition of #273 but specifically for importing via System.Reflection. A fix for this will be present in 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dotnet Issues related to AsmResolver.DotNet
Projects
None yet
Development

No branches or pull requests

2 participants