-
Notifications
You must be signed in to change notification settings - Fork 538
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
Binaries produced by .Net Maui compile on Android does not enable security flags #9786
Comments
What is |
If % checksec.sh --file libxamarin-app.so
RELRO STACK CANARY NX PIE RPATH RUNPATH FILE
Partial RELRO No canary found NX enabled DSO No RPATH No RUNPATH libxamarin-app.so then this is expected;
% checksec.sh --file libaot-System.Private.CoreLib.dll.so
RELRO STACK CANARY NX PIE RPATH RUNPATH FILE
Partial RELRO No canary found NX enabled DSO No RPATH No RUNPATH libaot-System.Private.CoreLib.dll.so |
Yes it is the checksec.sh script that generates this report as you found. It is on all binaries generated by maui The output for a release build library that is in our APK is the same:
This file is 520kb, there is not just one function in this binary. |
Consider again % checksec.sh --file libaot-System.Private.CoreLib.dll.so
RELRO STACK CANARY NX PIE RPATH RUNPATH FILE
Partial RELRO No canary found NX enabled DSO No RPATH No RUNPATH libaot-System.Private.CoreLib.dll.so What does it have?
In fact, there are no functions in this binary. It has one symbol, which is Data ( Canaries are desirable for (1) executable code, which (2) has on-stack arrays that can be overwritten:
If you're not executable code, there's nowhere for the canary to go. If you don't have an on-stack buffer, the canary is pointless; the purpose of the canary is to track buffer overruns within the function, and if you don't have a buffer, what is there to overrun?
No. |
Thank you, you may want a official response about this, there are independent researchers reporting this as a security vulnerability, which means you'll get more issues reported. |
Description
When you build a .Net Maui project it generates binaries that do not have all the security flags turned on.
Steps to Reproduce
Reproduction steps
Expected that security flags are set on the output binaries
Actually the flags are:
Partial RELRO
No Canary found
NX enabled
DSO
No RPATH
No RUNPATH
Link to public reproduction project repository
No response
Version with bug
8.0.92 SR9.2
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
All
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: