Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1406518 - mcelog package should be built with PIE (and other hardening) flags
Summary: mcelog package should be built with PIE (and other hardening) flags
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: mcelog
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Prarit Bhargava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: harden-failure
TreeView+ depends on / blocked
 
Reported: 2016-12-20 19:08 UTC by Christian Stadelmann
Modified: 2020-11-06 12:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1272537
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Stadelmann 2016-12-20 19:08:55 UTC
+++ This bug was initially created as a clone of Bug #1272537 +++

https://fedoraproject.org/wiki/Changes/Harden_All_Packages requires packages to
be hardened (and also support hardening efforts). Currently, mcelog does not
take advantage of all the hardening features we have in Fedora, and the
attached patch tries to fix this.

Before the hardening patch is applied,

$ ./scanner.py ~/analysis/mcelog/upstream/ # contains RPMs from Rawhide
mcelog,mcelog-101-2.9bfaad8f92c5.fc23.x86_64.rpm,/usr/sbin/mcelog,mode=0100755,NX=Enabled,CANARY=Enabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Partial$strncpy$memset$getcwd$read$fgets$memcpy$memmove$pread$asprintf,CATEGORY=network-local,TEMPPATHS=None,DEPS=libc.so.6


After the hardening patch is applied,

$ ./scanner.py ~/analysis/mcelog/mine/
mcelog,mcelog-101-2.9bfaad8f92c5.fc24.x86_64.rpm,/usr/sbin/mcelog,mode=0100755,NX=Enabled,CANARY=Enabled,RELRO=Enabled,PIE=Enabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Partial$strncpy$memset$getcwd$read$fgets$memcpy$memmove$pread$asprintf,CATEGORY=network-local,TEMPPATHS=None,DEPS=libc.so.6

You can use https://fedoraproject.org/wiki/Changes/Harden_All_Packages#How_To_Test to verify if the patch is working for your builds too.

--- Additional comment from Fedora End Of Life on 2016-11-24 07:48:44 EST ---

Bug still present on Fedora 25.

Comment 1 Fedora End Of Life 2017-11-16 19:48:06 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

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

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is 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  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

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.

Comment 2 Christian Stadelmann 2017-11-23 10:42:06 UTC
$ checksec --file /usr/sbin/mcelog
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH	FORTIFY	Fortified Fortifiable  FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   Yes	11	20	/usr/sbin/mcelog

Comment 3 Ben Cotton 2018-11-27 17:06:49 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 4 Ben Cotton 2019-02-19 17:12:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 5 Ben Cotton 2020-04-30 20:39:51 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 6 Christian Stadelmann 2020-05-01 17:51:15 UTC
Checksec's cmdline changed but the issue is still the same:
$ checksec --file=/usr/sbin/mcelog
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH	Symbols		FORTIFY	Fortified	Fortifiable  FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   No Symbols      Yes	11		20	/usr/sbin/mcelog

Comment 7 Ben Cotton 2020-11-03 14:58:14 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 8 Christian Stadelmann 2020-11-06 12:50:12 UTC
with mcelog-168.2.fc33.x86_64:

$ checksec --file=/usr/sbin/mcelog
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH	Symbols		FORTIFY	Fortified	Fortifiable	FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   No Symbols	  Yes	12		21		/usr/sbin/mcelog


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