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.

Bug 2059471

Summary: annocheck reports that rhc-package-manager-worker is compiled without PIE and BIND_NOW
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: rhcAssignee: Link Dupont <link>
Status: CLOSED ERRATA QA Contact: Pavol Kotvan <pakotvan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: cmarinea, fjansen, link, pakotvan, pvlasin
Target Milestone: rcKeywords: Triaged
Target Release: 9.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-0.2.1-5.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2059690 2060539 2060784 (view as bug list) Environment:
Last Closed: 2022-05-17 14:07:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2059690, 2059693, 2060784    

Description Jan Pazdziora (Red Hat) 2022-03-01 06:33:04 UTC
Description of problem:

The new version of rhc seems to package rhc-package-manager-worker. Running annocheck reports that the binary was not compiled with PIE, a setting important for Common Criteria certification.

Version-Release number of selected component (if applicable):

rhc-0.2.1-4.el8

How reproducible:

Deterministsic.

Steps to Reproduce:
1. rpm -ql rhc | xargs -I '{}' find '{}' -maxdepth 1 -type f | xargs annocheck --verbose --skip-all --test-pie --test-pic --test-bind-now --test-gnu-relro --test-stack-prot

Actual results:

annocheck: Warning: /etc/rhc/config.toml: is not an ELF format file.
annocheck: Version 10.29.
annocheck: Warning: /etc/rhc/workers/rhc-package-manager.toml: is not an ELF format file.
Hardened: /usr/bin/rhc: PASS: pie test 
Hardened: /usr/bin/rhc: PASS: bind-now test 
Hardened: /usr/bin/rhc: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/bin/rhc: PASS: stack-prot test 
Hardened: /usr/bin/rhc: PASS: pic test 
Hardened: /usr/bin/rhc: PASS: gnu-relro test 
annocheck: Warning: /usr/lib/systemd/system/rhcd.service: is not an ELF format file.
Hardened: rhc: Overall: PASS.
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: info: For more information visit: https://sourceware.org/annobin/annobin.html/Test-pie.html
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: FAIL: bind-now test because not linked with -Wl,-z,now 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: info: For more information visit: https://sourceware.org/annobin/annobin.html/Test-bind-now.html
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: Not checking for gaps (binary created by a tool without an annobin plugin).
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: gnu-relro test because no dynamic segment present 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: pic test because GO does not support a -fPIC option 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: stack-prot test because GO is stack safe 
Hardened: rhc-package-manager-worker: Overall: FAIL.
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: FAIL: pie test because not built with '-Wl,-pie' (gcc/clang) or '-buildmode pie' (go) 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: info: For more information visit: https://sourceware.org/annobin/annobin.html/Test-pie.html
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: FAIL: bind-now test because not linked with -Wl,-z,now 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: info: For more information visit: https://sourceware.org/annobin/annobin.html/Test-bind-now.html
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: Not checking for gaps (binary created by a tool without an annobin plugin).
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: gnu-relro test because no dynamic segment present 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: pic test because GO does not support a -fPIC option 
Hardened: /usr/libexec/rhc/rhc-package-manager-worker: skip: stack-prot test because GO is stack safe 
Hardened: rhc-package-manager-worker: Overall: FAIL.
Hardened: /usr/sbin/rhcd: PASS: pie test 
Hardened: /usr/sbin/rhcd: PASS: bind-now test 
Hardened: /usr/sbin/rhcd: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/sbin/rhcd: PASS: stack-prot test 
Hardened: /usr/sbin/rhcd: PASS: pic test 
Hardened: /usr/sbin/rhcd: PASS: gnu-relro test 
annocheck: Warning: /usr/share/bash-completion/completions/rhc: is not an ELF format file.
Hardened: rhcd: Overall: PASS.
annocheck: Warning: /usr/share/bash-completion/completions/rhcd: is not an ELF format file.
annocheck: Warning: /usr/share/doc/rhc/README.md: is not an ELF format file.
annocheck: Warning: /usr/share/doc/rhc/tags.toml: is not an ELF format file.
annocheck: Warning: /usr/share/doc/rhc/README.md: is not an ELF format file.
annocheck: Warning: /usr/share/doc/rhc/tags.toml: is not an ELF format file.
annocheck: Warning: /usr/share/man/man1/rhc.1.gz: is not an ELF format file.
annocheck: Warning: /usr/share/man/man1/rhcd.1.gz: is not an ELF format file.
annocheck: Warning: /usr/share/pkgconfig/rhc.pc: is not an ELF format file.

Expected results:

No FAILs.

Additional info:

This is a regression against rhc-0.2.0-5.el8 (which did not ship rhc-package-manager-worker).

Comment 11 errata-xmlrpc 2022-05-17 14:07:33 UTC
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: rhc), 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:2651