Bug 621983 - -zrelro should be the linker default
-zrelro should be the linker default
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Nick Clifton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-06 13:08 EDT by Richard Henderson
Modified: 2012-08-16 18:34 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-16 18:34:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Make -zrelro the default (2.10 KB, patch)
2010-08-10 09:45 EDT, Andreas Schwab
no flags Details | Diff

  None (edit)
Description Richard Henderson 2010-08-06 13:08:42 EDT
Is there any good reason for not having -zrelro be the default
for the linker, so that every system library can benefit without
having to modify every package's makefile?
Comment 1 Andreas Schwab 2010-08-10 09:45:20 EDT
Created attachment 437882 [details]
Make -zrelro the default

This is the patch I wrote for the openSUSE binutils
Comment 2 Jakub Jelinek 2010-08-11 03:56:17 EDT
-z relro has a runtime cost (up to a page per object per process wasted (to align end of PT_GNU_RELRO subsegment on page boundary and that is all writable memory) plus a mprotect syscall per object/process).  It has obvious benefits too (security wise), but it isn't for free.
Comment 3 Richard Henderson 2010-08-11 10:55:42 EDT
(In reply to comment #2)
I realize it isn't free, and that's why it should always be disable-able.
But, security wise, I'm suggesting that it should be the _default_.
Comment 4 Denys Vlasenko 2010-08-12 08:09:55 EDT
(In reply to comment #2)
> -z relro has a runtime cost (up to a page per object per process wasted (to
> align end of PT_GNU_RELRO subsegment on page boundary and that is all writable
> memory) plus a mprotect syscall per object/process).  It has obvious benefits
> too (security wise), but it isn't for free.    

Wow, this does not look good. On an average desktop, it would be a few mbytes of wasted memory.
Comment 5 Ricky Zhou 2011-08-31 09:23:29 EDT
For what it's worth, I believe partial relro is already being enabled by default for all packages from F16 onward, so this would only change anything for programs that people compile themselves.
Comment 6 Nick Clifton 2012-03-06 10:35:14 EST
Hi Guys,

  I have decided to go ahead and add this patch to the current rawhide binutils ( binutils-2.22.52.0.1-7.fc18).  In the end I think that security wins out over package size, especially given that the old behaviour can be restored via a command line switch.

Cheers
  Nick
Comment 7 Fedora End Of Life 2012-08-16 18:34:51 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Note You need to log in before you can comment on or make changes to this bug.