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 postgresql 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,
Version-Release number of selected component (if applicable):
You can use following programs to check if a package is hardened:
Steps to Reproduce:
Get scanner.py from https://github.com/kholia/checksec
$ ./scanner.py postgresql-server-9.2.3-1.fc19.x86_64.rpm
/usr/bin/postgres has PIE disabled.
/usr/bin/postgres should have PIE enabled.
Fixing the problem:
"_hardened_build" rpm spec macro can be used to harden a package.
For an example, see
FWIW, other distributions ship PIE enabled postgresql
I'm concerned about the possible effects of this on the available address space in 32-bit mode: people tend to run Postgres with shared memory segments that are large enough that there's not huge amounts of address space available for ASLR to waste. However, on my way to try to investigate how bad that issue might be in practice, I found out that there's significantly worse breakage that would have to be dealt with before we can even think about this: see bug #952946.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
*** Bug 1092552 has been marked as a duplicate of this bug. ***
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
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 19 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.
Adding keyword to keep this filled against Rawhide.
(In reply to Tom Lane from comment #3)
> I'm concerned about the possible effects of this on the available address
> space in 32-bit mode: people tend to run Postgres with shared memory
> segments that are large enough that there's not huge amounts of address
> space available for ASLR to waste.
As PostgreSQL now uses shm_open() & mmap(), it seems to be OK even with ASLR.
From my testing, [heap] segment always grows against mmap()'ed segments, and
it may jump over segments with mmap'ed libraries, etc.. as shown in example
mapping in bug #1263974. So the address space may be almost ideally
> However, on my way to try to investigate
> how bad that issue might be in practice, I found out that there's
> significantly worse breakage that would have to be dealt with before we can
> even think about this: see bug #952946.
As mentioned in cited bug #952946, this seems to be fixed in Kernel 4.1+, so
we should be OK to finally enable hardening -- I'll do so now.
Readers, please stop me if I missed something important.
*** Bug 1211541 has been marked as a duplicate of this bug. ***