Bug 1906079 - simple reproduces fails to pass annocheck
Summary: simple reproduces fails to pass annocheck
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-09 16:09 UTC by Alexandra Petlanová Hájková
Modified: 2021-11-30 17:23 UTC (History)
4 users (show)

Fixed In Version: annobin-9.49-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-30 17:23:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alexandra Petlanová Hájková 2020-12-09 16:09:48 UTC
Version-Release number of selected component (if applicable):
annobin-annocheck-9.28-3.fc33.ppc64le (but also fails on aarch64 and x86_64)

How reproducible:
 cat t.c
#include <stdio.h>
#include <stdlib.h>
 
__attribute__ ((weak)) __int128
div128 (__int128 a, __int128 b)
{
  return a / b;
}
 
int
main (int argc, char **argv)
{
  int a = atoi (argv[1]);
  int b = atoi (argv[2]);
  printf ("%ld\n", (long) div128 (a, b));
  return 0;
}


Steps to Reproduce:
1. FLAGS=$(rpm --eval "%{build_cflags} %{build_ldflags}")
2. echo $FLAGS
-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
3.gcc $FLAGS t.c
4.annocheck -v a.out

Actual results:
annocheck: Version 9.28.
Hardened: a.out: info: Set binary producer to gcc version 10.
Hardened: a.out: WARN: Unable to determine the binary's producer from its DW_AT_producer string.
Hardened: a.out: PASS: No gaps found.
Hardened: a.out: skip: Test for -Wl,-z-now.  (Dynamic segment present, but no dynamic relocations found).
Hardened: a.out: skip: Branch protection.  (Not an AArch64 binary).
Hardened: a.out: skip: Test for control flow protection.  (Only supported on x86 binaries).
Hardened: a.out: PASS: One dynamic section/segment found.
Hardened: a.out: skip: Entry point instruction is ENDBR.  (Not an x86 binary).
Hardened: a.out: skip: Test for -D_FORTIFY_SOURCE.  (No GCC compiled object files).
Hardened: a.out: skip: The test for -D_GLIBCXX_ASSERTIONS.  (No compiled code seen).
Hardened: a.out: skip: Test for -Wl,-z,relro.  (No dynamic relocations).
Hardened: a.out: PASS: Stack not executable.
Hardened: a.out: MAYB: The optimization setting was not recorded.
Hardened: a.out: MAYB: The PIC/PIE setting was not recorded.
Hardened: a.out: PASS: Compiled as a position independent binary.
Hardened: a.out: skip: GNU Property note check.  (Only useful on x86_64 binaries).
Hardened: a.out: PASS: DT_RPATH/DT_RUNPATH absent or rooted at /usr.
Hardened: a.out: PASS: No RWX segments found.
Hardened: a.out: skip: No data about the use of -fshort-enum available.
Hardened: a.out: skip: Test for stack clash support.  (No GCC compiled object files).
Hardened: a.out: MAYB: The -fstack-protector setting was not recorded.
Hardened: a.out: skip: Test for stack realignment support.  (Only needed on i686 binaries).
Hardened: a.out: PASS: No text relocations found.
Hardened: a.out: PASS: No thread cancellation problems.
Hardened: a.out: MAYB: No data about compilation warnings found.
Hardened: a.out: PASS: GOT/PLT relocations are read only.


Expected results:
passed for annobin-annocheck-9.27-2.fc32
annocheck: Version 9.27.
Hardened: a.out: info: Set binary producer to gcc version 10.
Hardened: a.out: PASS: No gaps found.
Hardened: a.out: skip: Test for -Wl,-z-now.  (Dynamic segment present, but no dynamic relocations found).
Hardened: a.out: skip: Branch protection.  (Not an AArch64 binary).
Hardened: a.out: PASS: Compiled with -fcf-protection.
Hardened: a.out: PASS: One dynamic section/segment found.
Hardened: a.out: PASS: Entry point instruction is ENDBR.
Hardened: a.out: PASS: Compiled with -D_FORTIFY_SOURCE=2.
Hardened: a.out: PASS: Compiled with -D_GLIBCXX_ASSERTIONS.
Hardened: a.out: skip: Test for -Wl,-z,relro.  (No dynamic relocations).
Hardened: a.out: PASS: Stack not executable.
Hardened: a.out: PASS: Compiled with sufficient optimization.
Hardened: a.out: PASS: Compiled with PIC/PIE.
Hardened: a.out: PASS: Compiled as a position independent binary.
Hardened: a.out: PASS: Good GNU Property note.
Hardened: a.out: PASS: DT_RPATH/DT_RUNPATH absent or rooted at /usr.
Hardened: a.out: PASS: No RWX segments found.
Hardened: a.out: PASS: Consistent use of the -fshort-enum option.
Hardened: a.out: PASS: Compiled with -fstack-clash-protection.
Hardened: a.out: PASS: Compiled with sufficient stack protection.
Hardened: a.out: skip: Test for stack realignment support.  (Only needed on i686 binaries).
Hardened: a.out: PASS: No text relocations found.
Hardened: a.out: PASS: No thread cancellation problems.
Hardened: a.out: PASS: Compiled with either -Wall and/or -Wformat-security.
Hardened: a.out: PASS: GOT/PLT relocations are read only.
Hardened: a.out: PASS.

Comment 1 Martin Cermak 2020-12-09 16:20:28 UTC
It fails also with a hello world like this:

int main ()
{
  return 0;
}

annobin-9.28-3.fc33.x86_64
gcc-10.2.1-9.fc33.x86_64
binutils-2.35-15.fc33.x86_64

Comment 2 Nick Clifton 2020-12-09 17:27:24 UTC
Should be fixed with the update to annobin-9.49

Comment 3 Martin Cermak 2020-12-09 17:44:41 UTC
Verified with 

annobin-9.49-1.fc33.x86_64
annobin-annocheck-9.49-1.fc33.x86_64
gcc-10.2.1-9.fc33.x86_64
binutils-2.35-15.fc33.x86_64

Comment 4 Ben Cotton 2021-11-04 16:49:40 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-11-30 17:23:15 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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