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

Avoid undefining _FORTIFY_SOURCE unnecessarily #167

Merged
merged 1 commit into from
Aug 18, 2021
Merged

Avoid undefining _FORTIFY_SOURCE unnecessarily #167

merged 1 commit into from
Aug 18, 2021

Conversation

davidpolverari
Copy link
Contributor

The build systems of some Linux distros (like Debian) make use of
_FORTIFY_SOURCE in more secure levels than stated by pev. This patch
only defines _FORTIFY_SOURCE if it has not been defined before.

The previous approach of undefining and defining it unconditionally
caused a weakening of the hardening expected by those distros' build
systems. This patch keeps the same functionality as before, while
allowing for distros to use more secure levels if so they wish.

The build systems of some Linux distros (like Debian) make use of
_FORTIFY_SOURCE in more secure levels than stated by pev. This patch
only defines _FORTIFY_SOURCE if it has not been defined before.

The previous approach of undefining and defining it unconditionally
caused a weakening of the hardening expected by those distros' build
systems. This patch keeps the same functionality as before, while
allowing for distros to use more secure levels if so they wish.
@merces
Copy link
Collaborator

merces commented Aug 18, 2021

Thanks for that!

@merces merces self-assigned this Aug 18, 2021
@merces merces merged commit 69c355e into mentebinaria:master Aug 18, 2021
@davidpolverari davidpolverari deleted the distro_fortify branch August 18, 2021 18:46
@davidpolverari
Copy link
Contributor Author

Thanks for that!

You're welcome!

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.

None yet

2 participants