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

Disable PIE hardening in more places #50295

Merged
merged 1 commit into from Nov 13, 2018
Merged

Conversation

matthewbauer
Copy link
Member

Motivation for this change

/cc @dtzWill

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libxml2

Partial log (click to expand)

/nix/store/sfvr5ib3yqyxj2vzr832in3dsihqsriy-libxml2-2.9.8-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libxml2

Partial log (click to expand)

/nix/store/h73hfs1kkr9r8zr8rgjzivdc2ff0azdq-libxml2-2.9.8-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: libxml2

Partial log (click to expand)

these paths will be fetched (0.03 MiB download, 0.09 MiB unpacked):
  /nix/store/fy1lmal54cgkr714fv1iy3m5wprjks2h-libxml2-2.9.8-bin
copying path '/nix/store/fy1lmal54cgkr714fv1iy3m5wprjks2h-libxml2-2.9.8-bin' from 'https://cache.nixos.org'...
/nix/store/fy1lmal54cgkr714fv1iy3m5wprjks2h-libxml2-2.9.8-bin

Some packages don’t work correctly with pie. Here I disable it for:

- busybox
- linux kernel
- kexectools

I also get rid of the Musl conditional for disabling pie in GCC and
Binutils. Some day we might want to enable PIE without Musl and it
will be useful to have the *just* work with our compiler and linkers.
@zimbatm
Copy link
Member

zimbatm commented Nov 13, 2018

what is the motivation behind that change @matthewbauer ? Isn't PIE a good thing to have?

@matthewbauer
Copy link
Member Author

It doesn't work in many places. You will frequently get something along the lines of ld: -r and -pie may not be used together. Some packages will explicitly pass -nopie when they absolutely need to link relocatably. These packages that I put here don't have it though.

More info: https://wiki.ubuntu.com/SecurityTeam/PIE

@LnL7
Copy link
Member

LnL7 commented Nov 13, 2018

I had the same question, it's enabled for a reason so this seems kind of undesirable to me.

@dtzWill
Copy link
Member

dtzWill commented Nov 13, 2018 via email

@zimbatm
Copy link
Member

zimbatm commented Nov 13, 2018

Thanks for the update @dtzWill, makes sense! Without the context it looked like protections where casually removed but it's not the case.

@globin
Copy link
Member

globin commented Nov 14, 2018

Yes, just to clear this up, we have never had PIE being enabled by default. It was always opt-in. This was mostly done because this caused much more breakage than the other hardening flags, and even without this it was hard enough to get it in. :)

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

6 participants