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.
DescriptionJan Pazdziora (Red Hat)
2021-07-30 12:39:42 UTC
Description of problem:
Running annocheck against glibc reports --test-pic/--test-pie failures on s390x.
Version-Release number of selected component (if applicable):
glibc-2.33.9000-42.el9.s390x
annobin-annocheck-9.79-1.el9.s390x
How reproducible:
Deterministic
Steps to Reproduce:
1. rpm -qal 'glibc*' | while read f ; do if test -f "$f" -a ! -L "$f" ; then echo $f ; fi ; done | xargs -L 200 annocheck --verbose --verbose --ignore-gaps --skip-all --test-pic --test-pie 2> /dev/null | grep FAIL:
Actual results:
Hardened: /usr/sbin/iconvconfig: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/sbin/iconvconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10017c0..0x1004780) (source: annobin notes)
Hardened: /usr/sbin/iconvconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1003e70..0x10047d2) (source: annobin notes)
Hardened: /usr/libexec/getconf/XBS5_LP64_OFF64: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/libexec/getconf/XBS5_LP64_OFF64: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1000d20..0x1001434) (source: annobin notes)
Hardened: /usr/libexec/getconf/POSIX_V7_LP64_OFF64: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/libexec/getconf/POSIX_V7_LP64_OFF64: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1000d20..0x1001434) (source: annobin notes)
Hardened: /usr/libexec/getconf/POSIX_V6_LP64_OFF64: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/libexec/getconf/POSIX_V6_LP64_OFF64: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1000d20..0x1001434) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1087590..0x1088190) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10879c0..0x10883a6) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10002c0..0x1087362) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1003a00..0x1087590) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10002c0..0x1000512) (source: annobin notes)
Hardened: /sbin/ldconfig: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1000308..0x10607b2) (source: annobin notes)
Hardened: /usr/sbin/zic: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/sbin/zic: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1001740..0x100a72c) (source: annobin notes)
Hardened: /usr/bin/zdump: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/zdump: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10011f0..0x1003120) (source: annobin notes)
Hardened: /usr/bin/sprof: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/sprof: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1001a30..0x10046d8) (source: annobin notes)
Hardened: /usr/bin/pldd: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/pldd: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10014b0..0x10023a2) (source: annobin notes)
Hardened: /usr/bin/pldd: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10023b0..0x10024ea) (source: annobin notes)
Hardened: /usr/bin/localedef: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/localedef: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1003700..0x103a83e) (source: annobin notes)
Hardened: /usr/bin/localedef: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10047b0..0x103a78c) (source: annobin notes)
Hardened: /usr/bin/locale: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/locale: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10025a0..0x100663e) (source: annobin notes)
Hardened: /usr/bin/locale: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1004880..0x100658c) (source: annobin notes)
Hardened: /usr/bin/iconv: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/iconv: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1002c70..0x100b3cc) (source: annobin notes)
Hardened: /usr/bin/iconv: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1003f80..0x100adda) (source: annobin notes)
Hardened: /usr/bin/getent: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/getent: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10031a0..0x10052b6) (source: annobin notes)
Hardened: /usr/bin/getconf: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/getconf: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1000d20..0x1001434) (source: annobin notes)
Hardened: /usr/bin/gencat: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
Hardened: /usr/bin/gencat: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x10016c0..0x1003cda) (source: annobin notes)
Hardened: /usr/bin/gencat: FAIL: pic test because -fpic/-fpie not enabled (addr range: 0x1003ce0..0x1003e1a) (source: annobin notes)
Expected results:
No FAILs reported.
Additional info:
Comment 2Jan Pazdziora (Red Hat)
2021-07-30 13:50:27 UTC
Actually, the problem is present on ppc64le and aarch64 as well, besides s390x.
Comment 4Siddhesh Poyarekar
2021-07-30 20:33:49 UTC
Executables are not built with -pie on s390x and ppc64le because they do not yet support static-pie. It may be worthwhile to add aarch64 to %pie_arches since it is supposed to be functional.
That said though, maybe we need to give a thought to enabling PIE on non-static binaries since with the exception of ldconfig, all of them are dynamic executables. It will need some upstream work though.
Siddhesh,
I believe that we could fix every executable here except ldconfig. We need to fix up the flag inheritance in the glibc build to achieve this, so there might be some build file changes. However, for ldconfig we will need to work with IBM to enable static PIE for ppc64le and s390x. I will raise this with the IBM teams.
(In reply to Siddhesh Poyarekar from comment #4)
> That said though, maybe we need to give a thought to enabling PIE on
> non-static binaries since with the exception of ldconfig, all of them are
> dynamic executables. It will need some upstream work though.
Agreed, we should do this upstream.
Comment 7Siddhesh Poyarekar
2021-10-27 12:27:23 UTC
I'll try to do this upstream before 2.35 freezes.
Comment 8Jan Pazdziora (Red Hat)
2021-11-29 12:08:40 UTC
With glibc-2.34-8.el9 and annobin-annocheck-10.29-1.el9, we no longer see the pie failure on
/usr/sbin/ldconfig
/usr/sbin/iconvconfig
/usr/libexec/getconf/XBS5_LP64_OFF64
/usr/libexec/getconf/POSIX_V7_LP64_OFF64
/usr/libexec/getconf/POSIX_V6_LP64_OFF64
on s390x and ppc64le (did not test aarch64).
Is that expected?
Comment 9Jan Pazdziora (Red Hat)
2021-11-29 12:12:47 UTC
The older compose where we still saw annocheck failing had the same glibc-2.34-8.el9 but older annobin-annocheck-10.23-1.el9, so I guess Nick might have insight into what has changed (or shouldn't have changed) in annocheck.
(In reply to Jan Pazdziora from comment #8)
> Is that expected?
Yes - I have added some explicit exceptions for glibc binaries to annocheck's heuristics. So now, glibc rpms should pass annocheck cleanly...
This change only went in recently (10.24), so that would explain why older versions of annocheck still complain.
(In reply to Florian Weimer from comment #11)
> Should be fixed by the rebuild.
This was not correct. The PIE fixes are not yet in.
Comment 15Siddhesh Poyarekar
2021-12-14 04:29:35 UTC
This is now pushed to upstream master. The backport to F35 now shows only one failure on s390x:
# rpm -qal 'glibc*' | while read f ; do if test -f "$f" -a ! -L "$f" ; then echo $f ; fi ; done | xargs -L 200 annocheck --verbose --verbose --ignore-gaps --skip-all --test-pic --test-pie 2> /dev/null | grep FAIL:
Hardened: /sbin/ldconfig: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) (source: ELF header)
which is expected since s390x does not support static-pie yet. Rest of the binaries are now built as PIE.
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 (new packages: glibc), 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://access.redhat.com/errata/RHBA-2022:3917