-
Notifications
You must be signed in to change notification settings - Fork 160
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
Skip BA2021 Analysis on .NET R2R & NativeAOT PE on non-Windows Platforms #1013
base: main
Are you sure you want to change the base?
Skip BA2021 Analysis on .NET R2R & NativeAOT PE on non-Windows Platforms #1013
Conversation
This change skips analysis when it finds non-Windows .NET R2R & NativeAOT PE's. The reason for this is the DoNotMarkWritableSectionsAsExecutable is Windows specific and R2R/NativeAOT do not follow Windows layout rules on non-Windows platforms. Fixes microsoft#970
@michaelcfanning @marmegh when either of you have a moment, can you please review? |
Basically once there will be tests it's good to go. What would be nice to have some files for testing it locally, can you provide them please? @steveisok cc @mkacmar |
@AllDwarf I think I amended the correct test and provided an artifact. If there's more I need to do, please let me know. #Resolved |
src/BinSkim.Rules/PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs
Show resolved
Hide resolved
Two easy suggestions, move your non windows helper into pe.cs and double-check your list of windows machine values to ensure they cover all legacy generated PE's not just today's relevant machine set. In reply to: 2659942241 |
5b0ad55
to
d54a955
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelcfanning I don't have the power to merge. If CI looks ok, can you do that? |
This change skips analysis when it finds non-Windows .NET R2R & NativeAOT PE's. The reason for this is the
DoNotMarkWritableSectionsAsExecutable
is Windows specific and R2R/NativeAOT do not follow Windows layout rules on non-Windows platforms.Fixes #970