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 1960166 - The end-to-end Sanity/annocheck-clean testcase fails with gcc-toolset-10 on rhel-8.5
Summary: The end-to-end Sanity/annocheck-clean testcase fails with gcc-toolset-10 on r...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: annobin
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Nick Clifton
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-13 08:33 UTC by Martin Cermak
Modified: 2021-09-17 14:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 16:44:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer binary (32.54 KB, application/x-sharedlib)
2021-05-13 08:33 UTC, Martin Cermak
no flags Details

Description Martin Cermak 2021-05-13 08:33:06 UTC
Created attachment 1782661 [details]
reproducer binary

The end-to-end Sanity/annocheck-clean testcase does pass with base rhel-8.5 at this stage (RHEL-8.5.0-20210513.n.0).  But it doesn't pass with the gcc-toolset-10 toolchain:

# What package versions do we use?
--------------------------------------------------------
8.5 Server x86_64 # for b in annocheck gcc as; do rpm -qf `which $b`; done
gcc-toolset-10-annobin-annocheck-9.29-1.el8.x86_64
gcc-toolset-10-gcc-10.2.1-8.2.el8.x86_64
gcc-toolset-10-binutils-2.35-6.el8.x86_64
8.5 Server x86_64 # 

# What are the compile flags?  (redhat-rpm-config-125-1.el8.noarch)
--------------------------------------------------------
8.5 Server x86_64 # GCC_SWITCHES=$(rpm --eval "%{build_cflags} %{build_ldflags}")
8.5 Server x86_64 # echo $GCC_SWITCHES 
-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat8.5 8.5 Server x86_64 # 


# The test inself
--------------------------------------------------------
8.5 Server x86_64 # gcc -v $GCC_SWITCHES stat.c -o stat >&/dev/null
8.5 Server x86_64 # annocheck -v stat
annocheck: Version 9.29.
Hardened: stat: info: Set binary producer to gcc version 8.
Hardened: stat: warn: Multiple versions of a tool were used to build this file (10 8) - using highest version.
Hardened: stat: FAIL: (component: main): Compiled without -fstack-clash-protection.
Hardened: stat: FAIL: (component: main): Compiled without -fcf-protection.
Hardened: stat: PASS: No gaps found.
Hardened: stat: skip: Test for -Wl,-z-now.  (Dynamic segment present, but no dynamic relocations found).
Hardened: stat: skip: Branch protection.  (Not an AArch64 binary).
Hardened: stat: FAIL: Parts of the binary were compiled without sufficient -fcf-protection.
Hardened: stat: PASS: One dynamic section/segment found.
Hardened: stat: PASS: Entry point instruction is ENDBR.
Hardened: stat: PASS: Compiled with -D_FORTIFY_SOURCE=2.
Hardened: stat: PASS: Compiled with -D_GLIBCXX_ASSERTIONS.
Hardened: stat: skip: Test for -Wl,-z,relro.  (No dynamic relocations).
Hardened: stat: PASS: Stack not executable.
Hardened: stat: PASS: Compiled with sufficient optimization.
Hardened: stat: PASS: Compiled with PIC/PIE.
Hardened: stat: PASS: Compiled as a position independent binary.
Hardened: stat: PASS: Good GNU Property note.
Hardened: stat: PASS: DT_RPATH/DT_RUNPATH absent or rooted at /usr.
Hardened: stat: PASS: No RWX segments found.
Hardened: stat: PASS: Consistent use of the -fshort-enum option.
Hardened: stat: FAIL: Parts of the binary were compiled without stack clash protection.
Hardened: stat: PASS: Compiled with sufficient stack protection.
Hardened: stat: skip: Test for stack realignment support.  (Only needed on i686 binaries).
Hardened: stat: PASS: No text relocations found.
Hardened: stat: PASS: No thread cancellation problems.
Hardened: stat: PASS: Compiled with either -Wall and/or -Wformat-security.
Hardened: stat: PASS: GOT/PLT relocations are read only.
8.5 Server x86_64 #

Comment 1 Nick Clifton 2021-05-17 14:03:33 UTC
Hi Martin,

  Please could you upload the "stat" binary that triggers these messages ?

Cheers
  Nick


Note You need to log in before you can comment on or make changes to this bug.