Bug 621983

Summary: -zrelro should be the linker default
Product: [Fedora] Fedora Reporter: Richard Henderson <rth>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dvlasenk, jakub, jstancek, mschmidt, nickc, ricky
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 22:34:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Make -zrelro the default none

Description Richard Henderson 2010-08-06 17:08:42 UTC
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 13:45:20 UTC
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 07:56:17 UTC
-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 14:55:42 UTC
(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 12:09:55 UTC
(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 13:23:29 UTC
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 15:35:14 UTC
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 22:34:51 UTC
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