Skip to content

Conversation

thomasnyman
Copy link
Contributor

@thomasnyman thomasnyman commented Oct 3, 2024

This PR adds an "additional considerations" section for the -Wl,-z,relro and -Wl,-z,now options section noting that shared libraries built without RELRO will prevent the application from benefitting from these hardening flags.


#### Additional considerations

To benefit from partial and full relro both the application executable and any libraries that are linked to the application must be built with the appropriate compiler options. If any non-RELRO libraries are loaded by `ld.so` they will prevent RELRO from being enabled for the applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, relro -> RELRO

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ld.so loads any non-RELRO libraries, RELRO will be disabled for that application.

@thomasnyman thomasnyman force-pushed the relro_on_library_dependencies branch 2 times, most recently from 19d405a to 2704393 Compare October 3, 2024 13:33
@thomasnyman thomasnyman merged commit a70890c into main Oct 3, 2024
5 checks passed
@thomasnyman thomasnyman deleted the relro_on_library_dependencies branch October 3, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants