Bug 2215968 - new annocheck regression related to abi-note.c
Summary: new annocheck regression related to abi-note.c
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-19 14:06 UTC by Václav Kadlčík
Modified: 2024-11-27 21:13 UTC (History)
14 users (show)

Fixed In Version: annobin-12.13-1.fc39
Clone Of:
Environment:
Last Closed: 2024-11-27 21:13:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Václav Kadlčík 2023-06-19 14:06:45 UTC
glibc-2.37.9000-13.fc39 introduced an annocheck regression when
compared to -10.fc39:

  MAYB: test: lto, reason: a region of code compiled without LTO was detected(abi-note.c)
  FAIL: fortify test because -D_FORTIFY_SOURCE=[2|3] was not present on the command line (abi-note.c)

Can be seen in the CI tests (fedora-ci.koji-build.rpminspect.static-analysis of https://bodhi.fedoraproject.org/updates/FEDORA-2023-3317068e8d).

Reproducible: Always

Comment 1 Siddhesh Poyarekar 2023-06-19 15:08:17 UTC
This is probably yet another exception to add for glibc sources; glibc is not built with _FORTIFY_SOURCE.

Comment 2 Florian Weimer 2023-06-19 15:49:30 UTC
(In reply to Václav Kadlčík from comment #0)
> glibc-2.37.9000-13.fc39 introduced an annocheck regression when
> compared to -10.fc39:
> 
>   MAYB: test: lto, reason: a region of code compiled without LTO was
> detected(abi-note.c)
>   FAIL: fortify test because -D_FORTIFY_SOURCE=[2|3] was not present on the
> command line (abi-note.c)
> 
> Can be seen in the CI tests (fedora-ci.koji-build.rpminspect.static-analysis
> of https://bodhi.fedoraproject.org/updates/FEDORA-2023-3317068e8d).

Which architecture(s) are affected? All of them?

Comment 3 Florian Weimer 2023-06-19 15:51:35 UTC
(In reply to Siddhesh Poyarekar from comment #1)
> This is probably yet another exception to add for glibc sources; glibc is
> not built with _FORTIFY_SOURCE.

We use this kludge in glibc.spec:

%if 0%{?_annotated_build} > 0
# libc_nonshared.a cannot be built with the default hardening flags
# because the glibc build system is incompatible with
# -D_FORTIFY_SOURCE.  The object files need to be marked as to be
# skipped in annobin annotations.  (The -specs= variant of activating
# annobin does not work here because of flag ordering issues.)
# See <https://bugzilla.redhat.com/show_bug.cgi?id=1668822>.
BuildFlagsNonshared="-fplugin=annobin -fplugin-arg-annobin-disable -Wa,--generate-missing-build-notes=yes"
%endif

We could probably build with -D_FORTIFY_SOURCE=3 instead, given that this is for the non-shared bits only (where fortification has no impact).

Comment 4 Siddhesh Poyarekar 2023-06-19 16:21:08 UTC
Hmm, I suppose we could even make this wait for a bit (i.e. until we enable fortification in 2.38) and then actually fix this by enabling fortification.  I think the first cut excludes csu, but that can be done incrementally.

Comment 5 Václav Kadlčík 2023-06-20 04:33:41 UTC
(In reply to Florian Weimer from comment #2)
> Which architecture(s) are affected? All of them?

Yes

Comment 6 Nick Clifton 2023-06-20 11:37:03 UTC
It looks like some more additions are needed to annocheck's heuristics for detecting glibc binaries.

The "/dev/null" component name in some of annocheck's messages is coming from the new string based notes which record a filename based upon the gcc command line used to build the binary being checked.  Presumably glibc has some kind of clever method for building some of its files.

Comment 7 Nick Clifton 2023-06-21 11:14:37 UTC
Should be fixed with annobin-12.13-1.fc39

Comment 8 Václav Kadlčík 2023-06-21 12:48:28 UTC
Yes, all the files annocheck complained about:
  /lib64/ld64.so.2                                                                                                                                              
  /lib64/ld-linux-x86-64.so.2                                                                                                                                   
  /lib64/libc.so.6                                                                                                                                              
  /lib/ld64.so.1                                                                                                                                                
  /lib/ld-linux-aarch64.so.1                                                                                                                                    
  /lib/ld-linux.so.2                                                                                                                                            
  /lib/libc.so.6                                                                                                                                                
  /usr/lib64/crt1.o                                                                                                                                             
  /usr/lib64/gcrt1.o                                                                                                                                            
  /usr/lib/crt1.o                                                                                                                                               
  /usr/lib/gcrt1.o
pass cleanly with annobin-12.13-1.fc39.

Comment 9 Fedora Release Engineering 2023-08-16 08:11:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 10 Aoife Moloney 2024-11-08 10:54:01 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
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
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 11 Aoife Moloney 2024-11-27 21:13:35 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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.