Bug 955148

Summary: knot package should be built with PIE flags
Product: [Fedora] Fedora Reporter: Dhiru Kholia <dkholia>
Component: knotAssignee: Paul Wouters <pwouters>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bressers, jv+fedora, pwouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: knot-1.2.0-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 16:58:41 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
this should enable PIE none

Description Dhiru Kholia 2013-04-22 13:28:08 UTC
Description of problem:

http://fedoraproject.org/wiki/Packaging:Guidelines#PIE says that "you MUST
enable the PIE compiler flags if your package is long running ...".

However, currently knot is not being built with PIE flags. This is a
clear violation of the packaging guidelines.

This issue (in its wider scope) is being discussed at,

https://fedorahosted.org/fesco/ticket/1104

https://lists.fedoraproject.org/pipermail/devel/2013-March/180827.html

Version-Release number of selected component (if applicable):

knot-1.1.3-3.fc19.x86_64.rpm

How reproducible:

You can use following programs to check if a package is hardened:

http://people.redhat.com/sgrubb/files/rpm-chksec

OR

https://github.com/kholia/checksec

Steps to Reproduce:

Get scanner.py from https://github.com/kholia/checksec

$ ./scanner.py knot-1.1.3-3.fc19.x86_64.rpm
knot,knot-1.1.3-3.fc19.x86_64.rpm,/usr/libexec/knot/knot-zcompile,NX=Enabled,CANARY=Enabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Enabled,CATEGORY=network-ip
knot,knot-1.1.3-3.fc19.x86_64.rpm,/usr/sbin/knotc,NX=Enabled,CANARY=Enabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Enabled,CATEGORY=None
knot,knot-1.1.3-3.fc19.x86_64.rpm,/usr/sbin/knotd,NX=Enabled,CANARY=Enabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Enabled,CATEGORY=network-ip

Comment 1 Dhiru Kholia 2013-05-15 07:52:21 UTC
Created attachment 748125 [details]
this should enable PIE

Comment 2 Dhiru Kholia 2013-06-03 06:05:17 UTC
Hi,

Is there any progress on this?

Does the attached modified .spec file works?

Comment 3 Jan Včelák 2013-09-01 16:58:41 UTC
This is fixed since 1.2.0-1 according to changelog.

* Fri Apr 05 2013 Paul Wouters <pwouters> - 1.2.0-1
- Updated to 1.2.0-1
- Enabled hardening/relro/pie protection

Verified:

% rpm-chksec ./knot-1.3.1-1.fc21.x86_64.rpm 
FILE                          TYPE        RELRO    PIE 
/usr/bin/kdig                 network-ip  full     yes 
/usr/bin/khost                network-ip  full     yes 
/usr/bin/knsupdate            network-ip  full     yes 
/usr/sbin/knotc               network-ip  full     yes 
/usr/sbin/knotd               daemon      full     yes

Comment 4 Fedora Update System 2013-09-01 17:01:32 UTC
knot-1.3.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/knot-1.3.1-1.fc19

Comment 5 Fedora Update System 2013-09-11 01:56:17 UTC
knot-1.3.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.