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-05-04 20:04:32 UTC
Description of problem:
Running annocheck on pigz reports that binaries in /usr/bin were compiled without stack protector and without position independent code.
Version-Release number of selected component (if applicable):
pigz-2.5-2.el9.x86_64
How reproducible:
Deterministic
Steps to Reproduce:
1. rpm -ql pigz | xargs annocheck -v --ignore-gaps | grep FAIL:
Actual results:
Hardened: /usr/bin/unpigz: FAIL: pie test because not linked with -Wl,-pie
Hardened: /usr/bin/unpigz: FAIL: bind-now test because not linked with -Wl,-z,now
Hardened: /usr/bin/unpigz: FAIL: stack-prot test because stack protection deliberately disabled (addr range: 0x403580..0x403585)
Hardened: /usr/bin/pigz: FAIL: pie test because not linked with -Wl,-pie
Hardened: /usr/bin/pigz: FAIL: bind-now test because not linked with -Wl,-z,now
Hardened: /usr/bin/pigz: FAIL: stack-prot test because stack protection deliberately disabled (addr range: 0x403580..0x403585)
Expected results:
No FAILs reported by annocheck.
Additional info:
Comment 6Jan Pazdziora (Red Hat)
2021-10-05 20:11:29 UTC
Comment 7Jan Pazdziora (Red Hat)
2021-10-06 14:58:45 UTC
This document might also be useful: https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/buildflags.md.
I see that pigz.spec already does
%make_build CFLAGS="$RPM_OPT_FLAGS"
so it might be just a matter of using
%make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
or
%make_build CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}"
(In reply to Jan Pazdziora from comment #7)
> This document might also be useful:
> https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/
> buildflags.md.
>
> I see that pigz.spec already does
>
> %make_build CFLAGS="$RPM_OPT_FLAGS"
>
> so it might be just a matter of using
>
> %make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
>
> or
>
> %make_build CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}"
Yep. My above comment was kind of to myself :)
P.
QE: This is a small change. Before these changes,
[03:40 PM root@intel-purley-04 SPECS]# rpm -ivh pigz-2.5-3.el9.x86_64.rpm
[03:40 PM root@intel-purley-04 SPECS]# rpm -ql pigz | xargs annocheck -v --ignore-gaps | grep FAIL: | grep pigz
<snip>
Hardened: /usr/bin/pigz: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go)
Hardened: /usr/bin/pigz: FAIL: bind-now test because not linked with -Wl,-z,now
Hardened: /usr/bin/unpigz: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go)
Hardened: /usr/bin/unpigz: FAIL: bind-now test because not linked with -Wl,-z,now
<snip>
Note, you will see warnings from static /usr/lib/.build-id/ files. These are okay.
After the change
[03:43 PM root@intel-purley-04 SPECS]# rpm -ivh pigz-2.5-4.el9.x86_64.rpm
[03:43 PM root@intel-purley-04 SPECS]# rpm -ql pigz | xargs annocheck -v --ignore-gaps | grep FAIL: | grep pigz
You will not see any warnings from /usr/bin/pigz.
QE can you set ITM and provide qa_ack?
Thanks,
P.
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: pigz), 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:3944