Skip to content

Makefile: Pass CFLAGS or RPM %optflags also to the linker #40

@solardiz

Description

@solardiz

Perhaps we need the equivalent of openwall/tcb#23 also here. This may be trickier here because our Makefile here is smart to recognize the different systems and pass custom linker flags.

Here's the current checksec output on files coming from the Rocky Linux 9 SIG/Security package:

Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   No Symbols	N/A	0		0	/bin/pwqcheck
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   No Symbols	N/A	0		0	/bin/pwqfilter
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   No Symbols	N/A	0		0	/bin/pwqgen
Partial RELRO   Canary found      NX enabled    DSO             No RPATH   No RUNPATH   No Symbols	N/A	0		0	/lib64/libpasswdqc.so.1
Partial RELRO   Canary found      NX enabled    DSO             No RPATH   No RUNPATH   No Symbols	N/A	0		0	/lib64/security/pam_passwdqc.so

For comparison, most other binaries and libraries on this distro get Full RELRO, and most binaries PIE enabled.

Since the above reuses Fedora's packaging almost verbatim, I suspect the same issue is also present on Fedora. We could fix it in the Makefile (this issue) or in Fedora's passwdqc.spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions