Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
RELRO protection now properly applied when requested
Previously, binary files started by the system loader would, in some cases, lack the Relocation Read-Only (RELRO) protection even though this had been explicitly requested when the application was built. This was due to a miscommunication between the static linker and the system loader. The underlying source code of the linker has been adjusted to ensure that it makes it possible for the loader to apply the RELRO protection, thus restoring the security feature for applications. Applications and all dependent object files, archives, and libraries built with an alpha or beta version of _binutils_ should be rebuilt to correct this defect. This update fixes the issue on the AMD64, Intel 64, 64-bit PowerPC, and 64-bit ARM architectures.
Created attachment 999663[details]
reproducer.tar.gz
Description of problem:
Binaries generated by ld sometimes lack relro protection, although it has explicitly been requested on the command line.
This has potential security implications, please treat this as embargoed for now. We will decide how to disclose this once we better understand this issue.
Version-Release number of selected component (if applicable):
binutils-2.23.52.0.1-16.el7.x86_64
How reproducible:
Always (with the reproducer).
Steps to Reproduce:
tar xf reproducer.tar.gz
cd reproducer
cmd="/usr/bin/ld --eh-frame-hdr --build-id -m elf_x86_64 -shared -o output.so -L. crti.o crtbeginS.o winbind_krb5_locator_17.o -z relro -z now -no-undefined --export-dynamic -lpthread --as-needed -rpath XXX -Bdynamic -lwbclient -lc crtendS.o crtn.o"
$(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO
$cmd; eu-readelf -a output.so | grep RELRO
Actual results:
[fweimer@oldenburg reproducer]$ $(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO
GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1
01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss
02 [RELRO: .dynamic]
06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got]
[fweimer@oldenburg reproducer]$ $cmd; eu-readelf -a output.so | grep RELRO
[fweimer@oldenburg reproducer]$
(relro only in the first case.)
Expected results:
[fweimer@oldenburg reproducer]$ $(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO
GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1
01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss
02 [RELRO: .dynamic]
06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got]
[fweimer@oldenburg reproducer]$ $cmd; eu-readelf -a output.so | grep RELRO
GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1
01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss
02 [RELRO: .dynamic]
06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got]
[fweimer@oldenburg reproducer]$
(relro in both cases.)
Additional info:
The reproducer is constructed in such a way that it should not depend on installed system libraries; in this case, they come from RHEL 6.6. With different libc versions, this reproducer does not show the bug, although we have seen similar issues with the RHEL 7 libc.
The reproducer does not work with binutils-2.25-5.fc22.x86_64 from Fedora 22 and binutils-2.25-6.fc23.x86_64 from current Fedora rawhide.
No need to embargo this because it is public information, based on the upstream discussion/commits Jakub provided.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2015-2079.html
Created attachment 999663 [details] reproducer.tar.gz Description of problem: Binaries generated by ld sometimes lack relro protection, although it has explicitly been requested on the command line. This has potential security implications, please treat this as embargoed for now. We will decide how to disclose this once we better understand this issue. Version-Release number of selected component (if applicable): binutils-2.23.52.0.1-16.el7.x86_64 How reproducible: Always (with the reproducer). Steps to Reproduce: tar xf reproducer.tar.gz cd reproducer cmd="/usr/bin/ld --eh-frame-hdr --build-id -m elf_x86_64 -shared -o output.so -L. crti.o crtbeginS.o winbind_krb5_locator_17.o -z relro -z now -no-undefined --export-dynamic -lpthread --as-needed -rpath XXX -Bdynamic -lwbclient -lc crtendS.o crtn.o" $(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO $cmd; eu-readelf -a output.so | grep RELRO Actual results: [fweimer@oldenburg reproducer]$ $(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1 01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss 02 [RELRO: .dynamic] 06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] [fweimer@oldenburg reproducer]$ $cmd; eu-readelf -a output.so | grep RELRO [fweimer@oldenburg reproducer]$ (relro only in the first case.) Expected results: [fweimer@oldenburg reproducer]$ $(echo "$cmd" | sed s/-rpath.XXX//); eu-readelf -a output.so | grep RELRO GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1 01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss 02 [RELRO: .dynamic] 06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] [fweimer@oldenburg reproducer]$ $cmd; eu-readelf -a output.so | grep RELRO GNU_RELRO 0x001d68 0x0000000000201d68 0x0000000000201d68 0x000298 0x000298 R 0x1 01 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] .bss 02 [RELRO: .dynamic] 06 [RELRO: .ctors .dtors .jcr .data.rel.ro .dynamic .got] [fweimer@oldenburg reproducer]$ (relro in both cases.) Additional info: The reproducer is constructed in such a way that it should not depend on installed system libraries; in this case, they come from RHEL 6.6. With different libc versions, this reproducer does not show the bug, although we have seen similar issues with the RHEL 7 libc.