deb: no PIE/RELRO hardening for built binaries; static CGO_ENABLED=0 builds hit statically-linked-binary #75
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
heiko/gogogo#75
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Binaries produced via plain
go buildare neither PIE norRELRO-hardened, so lintian flags two warnings on every packaged Go
binary:
Setting CGO_ENABLED: 0 in the project's env: section (forcing a static
binary) avoids those two specific findings, but trips a new, harder
one instead:
which is strictly worse (an error, not a warning) -- confirmed live
while testing go.schlittermann.de/ius/joker-dmapi-client (cmd/joker):
switching to CGO_ENABLED=0 turned three W: into one E:, and lintian
aborted the pack run.
Current workaround in use
cert-proxy-client/cert-proxy-server already ship both parts of a
working combination:
statically-linked-binary (and, incidentally,
copyright-file-contains-full-apache-2-license, which is now fixed
separately, see the license-detection fix for nested cmd/ layouts).
This works, but every project has to discover and hand-roll this
pattern itself;
gogogo pack populatedoesn't scaffold alintian-overrides stub, and there's no built-in guidance that
"CGO_ENABLED=0 requires suppressing statically-linked-binary".
Suggested fixes (either or both)
supports it), so dynamically-linked binaries can be hardened without
needing to go static at all.
detected in the project's env:), also scaffold/append a
debian/.lintian-overrides entry for statically-linked-binary,
so static-linking projects get a clean lintian run out of the box
instead of having to reverse-engineer cert-proxy's approach.