[staging] {cc,binutils}-wrapper: fixes for PIE hardening#135619
Merged
r-burns merged 5 commits intoNixOS:stagingfrom Sep 24, 2021
Merged
[staging] {cc,binutils}-wrapper: fixes for PIE hardening#135619r-burns merged 5 commits intoNixOS:stagingfrom
r-burns merged 5 commits intoNixOS:stagingfrom
Conversation
nomeata
added a commit
to caffeinelabs/motoko
that referenced
this pull request
Aug 25, 2021
in #2532 we added a patch related to static building of ocaml packages, submitted to nixpkgs as NixOS/nixpkgs#124498, but it was never merged upstream. Supposedly a patch from NixOS/nixpkgs#135619 fixes it as well (and maybe more properly). So let’s try that!
This was referenced Aug 25, 2021
04ee46b to
9336e63
Compare
Contributor
Author
|
cc @TredwellGit since it looks like you're running into some of these issues in #104091 |
11 tasks
9d272e3 to
4831116
Compare
veprbl
reviewed
Sep 20, 2021
fixes:
pkgsMusl.bulletml
pkgsMusl.proot
pkgsMusl.python3
Debian explains this issue well in the dpkg-buildflags manpage:
-fPIE
Can be linked into any program, but not a shared library (recommended).
-fPIC
Can be linked into any program and shared library.
On projects that build both programs and shared libraries you might need to
make sure that when building the shared libraries -fPIC is always passed last
(so that it overrides any previous -PIE) to compilation flags such as CFLAGS.
(from https://manpages.debian.org/bullseye/dpkg-dev/dpkg-buildflags.1.en.html#hardening)
fixes e.g.: pkgsMusl.libfsm pkgsMusl.libiscsi pkgsMusl.nsjail pkgsMusl.pv match strings have whitespace on either side, which wasn't matching leading/trailing arguments previously
This is no longer needed with the previous PIE hardening fixes. This reverts commit 78d20f2.
This is no longer needed with the previous PIE hardening fixes. This reverts commit 74e0aaa.
This is no longer needed with the previous PIE hardening fixes. This reverts commit 2784f1b.
4831116 to
a41b83c
Compare
veprbl
approved these changes
Sep 21, 2021
12 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a number of packages which were broken on musl (where PIE hardening is currently enabled). For example:
Motivation for this change
Fixes #124476
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)