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

Add secure compilation options to cmake script #35

Closed
MertGunduz opened this issue Jun 8, 2024 · 1 comment
Closed

Add secure compilation options to cmake script #35

MertGunduz opened this issue Jun 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MertGunduz
Copy link
Owner

MertGunduz commented Jun 8, 2024

Enable stack protection to help prevent stack buffer overflow attacks

-fstack-protector-all

Enable additional checks for some standard library functions to detect buffer overflows

-D_FORTIFY_SOURCE=2

Generate position-independent code (PIC) suitable for use in a shared library

-fPIE

Create a position-independent executable (PIE)

-pie

Enable read-only relocations (RELRO) for more secure memory handling

-Wl,-z,relro

When enabled, the dynamic linker will resolve symbols when the application is started, reducing the risk of certain types of attacks

-Wl,-z,now
@MertGunduz
Copy link
Owner Author

Implemented 🚀 ❇️

@MertGunduz MertGunduz added the enhancement New feature or request label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant