Bug 955182

Summary: haproxy package should be built with PIE flags
Product: [Fedora] Fedora Reporter: Dhiru Kholia <dkholia>
Component: haproxyAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bressers, jeremy, robinlee.sysu, rohara
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: haproxy-1.4.23-2.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-22 03:16:55 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
this should enable PIE none

Description Dhiru Kholia 2013-04-22 13:58:53 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 haproxy 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):

haproxy-1.4.22-2.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 haproxy-1.4.22-2.fc19.x86_64.rpm
haproxy,haproxy-1.4.22-2.fc19.x86_64.rpm,/usr/bin/halog,NX=Enabled,CANARY=Disabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Enabled,CATEGORY=None
haproxy,haproxy-1.4.22-2.fc19.x86_64.rpm,/usr/sbin/haproxy,NX=Enabled,CANARY=Enabled,RELRO=Partial,PIE=Disabled,RPATH=Disabled,RUNPATH=Disabled,FORTIFY=Enabled,CATEGORY=network-ip

Comment 1 Ryan O'Hara 2013-04-22 14:58:21 UTC
Fixed in f19.

Comment 2 Fedora Update System 2013-04-22 15:23:17 UTC
haproxy-1.4.23-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/haproxy-1.4.23-2.fc19

Comment 3 Fedora Update System 2013-04-22 17:20:53 UTC
Package haproxy-1.4.23-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing haproxy-1.4.23-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6253/haproxy-1.4.23-2.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-04-27 03:05:30 UTC
haproxy-1.4.23-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Dhiru Kholia 2013-04-30 08:33:38 UTC
The fixed package is at the following URL, right?

http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/Packages/h/haproxy-1.4.23-2.fc19.x86_64.rpm

If yes, then the problem still exists.

(Cmd) analyze haproxy
('http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/Packages/h/haproxy-1.4.23-2.fc19.x86_64.rpm', '=>', '/scratch/repos/checksec/data/.cache/haproxy-1.4.23-2.fc19.x86_64.rpm')
{
    "build": "haproxy-1.4.23-2.fc19.x86_64.rpm",
    "daemon": true,
    "files": [
        {
            "CANARY": "Disabled",
            "CATEGORY": "None",
            "FORTIFY": "Enabled",
            "NX": "Enabled",
            "PIE": "Disabled",
            "RELRO": "Partial",
            "RPATH": "Disabled",
            "RUNPATH": "Disabled",
            "mode": 33261,
            "name": "/usr/bin/halog",
            "size": 36736
        },
        {
            "CANARY": "Enabled",
            "CATEGORY": "network-ip",
            "FORTIFY": "Enabled",
            "NX": "Enabled",
            "PIE": "Disabled",
            "RELRO": "Partial",
            "RPATH": "Disabled",
            "RUNPATH": "Disabled",
            "mode": 33261,
            "name": "/usr/sbin/haproxy",
            "size": 409760
        }
    ],
    "group": "System Environment/Daemons",
    "package": "haproxy"
}

Comment 6 Dhiru Kholia 2013-04-30 09:04:41 UTC
Created attachment 741800 [details]
this should enable PIE

Comment 7 Dhiru Kholia 2013-04-30 09:05:06 UTC
Created attachment 741801 [details]
this should enable PIE

Comment 8 Ryan O'Hara 2013-04-30 13:20:48 UTC
(In reply to comment #5)
> The fixed package is at the following URL, right?
> 
> http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/
> Packages/h/haproxy-1.4.23-2.fc19.x86_64.rpm
> 
> If yes, then the problem still exists.

I followed the instructions listed in comment #1. Specifically the instructions found here:

http://fedoraproject.org/wiki/Packaging:Guidelines#PIE

It appears these instructions need to be updated.

Comment 9 Ryan O'Hara 2013-04-30 14:40:35 UTC
Fixed in f19.

# ./rpm-chksec haproxy-1.4.23-3.fc19.x86_64.rpm
FILE                                                     TYPE        RELRO    PIE 
/usr/bin/halog                                           exec        partial  no  
/usr/sbin/haproxy                                        daemon      full     yes

Comment 10 Fedora Update System 2013-04-30 14:44:32 UTC
haproxy-1.4.23-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/haproxy-1.4.23-3.fc19

Comment 11 Fedora Update System 2013-04-30 19:58:07 UTC
Package haproxy-1.4.23-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing haproxy-1.4.23-3.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7032/haproxy-1.4.23-3.fc19
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2013-05-22 03:16:55 UTC
haproxy-1.4.23-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.