Bug 2044872

Summary: annocheck FAIL: pie test (golang)
Product: Red Hat Enterprise Linux 9 Reporter: rlemosor
Component: golangAssignee: David Benoit <dbenoit>
Status: CLOSED NOTABUG QA Contact: Edjunior Barbosa Machado <emachado>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: asm, dbenoit, emachado, rschiron, tschelle, tstellar, vkadlcik
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2053606 (view as bug list) Environment:
Last Closed: 2022-02-22 10:35:29 UTC Type: ---
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: 2044387, 2053606    

Description rlemosor 2022-01-25 10:34:47 UTC
Failed test: pie test

Test results:
\n Hardened: go: FAIL: pie test because not built with '-Wl'-pie' (gcc/clang) or '-buildmode pie' (go) \n Hardened: gofmt: FAIL: pie test because not built with '-Wl'-pie' (gcc/clang) or '-buildmode pie' (go) \n Hardened: boring.a:_x001.o: FAIL: fortify test because no indication that the necessary option was used (and a C compiler was detected) \n Hardened: boring.a:_x002.o: FAIL: fortify test because no indication that the necessary option was used (and a C compiler was detected) \n Hardened: boring.a:_x003.o: FAIL: fortify test because no indication that the necessary option was used (and a C compiler was detected) \n Hardened: boring.a:_x004.o: FAIL: fortify test because no indication that the necessary option was used (and a C compiler was detected) \n Hardened: boring.a:_x005.o: FAIL: fortify test because no indication that the necessary option was used (and a C compiler was detected) \n Hardened: boring.a:_x006.o: FAIL: fortify test because no indication that the necessary option was used (and

Applicable RPMs:
golang-bin-1.17.5-1.el9.aarch64.rpm; golang-bin-1.17.5-1.el9.ppc64le.rpm; golang-bin-1.17.5-1.el9.s390x.rpm; golang-bin-1.17.5-1.el9.x86_64.rpm; golang-race-1.17.5-1.el9.x86_64.rpm

Recommendation: Please fix the build system for the package or else add a skip of tests to the rpminspect.yaml file. For more details please see https://sourceware.org/annobin/annobin.html/Test-pie.html and https://sourceware.org/annobin/annobin.html/Waiving-Hardened-Results.html#Waiving-Hardened-Results.

Why this bug was filed: All packages in RHEL 9 built with gcc (g++, etc.) are required to use a common set of flags provided by the distribution. These flags turn on important security and performance features so it is critical that any package that lacks these flags be repaired. A scanning tool named annocheck, part of the annobin package, was used to scan RHEL 9 packages. This BZ was created because binary packages of this component with the mentioned NVRs were not built with the requisite flags for one or more RHEL 9 architectures.

How to reproduce the failure: You could try running annocheck locally against your builds: https://developers.redhat.com/blog/2019/02/04/annocheck-examining-the-contents-of-binary-files.

Annocheck resources:
* annobin documentation: https://sourceware.org/annobin/annobin.html/index.html
* annocheck on the customer portal: https://access.redhat.com/documentation/en-us/red_hat_developer_toolset/9/html/user_guide/chap-annobin

Contacts:
* Instant messaging: #tools on IRC
* Email: use tools for generic questions. Otherwise, use go-tools and llvm-clang-list for Go and Clang/LLVM specific questions.
* annobin-annocheck maintainer: Nick Clifton (nickc)

Comment 8 Red Hat Bugzilla 2023-09-15 01:51:18 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days