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.
DescriptionJan Pazdziora (Red Hat)
2021-11-13 15:04:06 UTC
Description of problem:
The ldconfig file is packaged by glibc as /sbin/ldconfig even if /sbin is a symlink to /usr/sbin so the file actually lands on disk as /usr/sbin/ldconfig.
One effect of this inconsistency is that on aarch64, it then causes annocheck to fail when we try to test all files on the disk, while avoiding symlinks.
Version-Release number of selected component (if applicable):
glibc-2.34-7.el9.aarch64
annobin-annocheck-10.23-1.el9.aarch64
How reproducible:
Deterministic.
Steps to Reproduce:
1. dnf install -y /usr/bin/annocheck /sbin/ldconfig
2. dnf -y --nogpgcheck debuginfo-install glibc glibc-gconv-extra
3. annocheck --verbose --ignore-gaps --skip-all --test-stack-prot /sbin/ldconfig
4. annocheck --verbose --ignore-gaps --skip-all --test-stack-prot /usr/sbin/ldconfig
Actual results:
annocheck: Version 10.23.
Hardened: /usr/sbin/ldconfig: Command line options not recorded in DWARF DW_AT_producer variable.
Hardened: /usr/sbin/ldconfig: info: ALSO written in C (source: DW_AT_language string).
Hardened: /usr/sbin/ldconfig: PASS: stack-prot test
Hardened: /usr/sbin/ldconfig: skip: stack-prot test because function _dl_start is part of the C library's startup code, which executes before stack protection is established
Hardened: /usr/sbin/ldconfig: FAIL: stack-prot test because stack protection deliberately disabled (function: _dl_tls_static_surplus_init)
Hardened: /usr/sbin/ldconfig: info: For more information visit: https://sourceware.org/annobin/annobin.html/Test-stack-prot.html
Hardened: ldconfig: Overall: FAIL.
Expected results:
annocheck: Version 10.23.
Hardened: /usr/sbin/ldconfig: Command line options not recorded in DWARF DW_AT_producer variable.
Hardened: /usr/sbin/ldconfig: info: ALSO written in C (source: DW_AT_language string).
Hardened: /usr/sbin/ldconfig: PASS: stack-prot test
Hardened: /usr/sbin/ldconfig: skip: stack-prot test because the ldconfig binary is a special case, hand-crafted by the glibc build system
Hardened: ldconfig: Overall: PASS.
Additional info:
Comment 1Jan Pazdziora (Red Hat)
2021-11-13 15:07:33 UTC
I filed this against glibc because the inconsistency of the %files with the disk layout bothers me in general. But maybe annocheck should be able to handle this situation gracefully.
Adding Nick to Cc for potential assessment whether this is truly just a bug in annocheck.
(In reply to Jan Pazdziora from comment #1)
> Adding Nick to Cc for potential assessment whether this is truly just a bug
> in annocheck.
It kind of is and is not a bug. Annocheck has a special exception for the ldconfig executable because it is known to be built in a special way, and without a lot of the usual security features. The code however checks the absolute path:
/* The ldconfig binary is known to be compiled with most security features. */
if (streq (data->full_filename, "/sbin/ldconfig"))
{
sprintf (reason, "the ldconfig binary is a special case, hand-crafted by the glibc build system");
skip (data, check < TEST_MAX ? check : TEST_NOTES, SOURCE_SKIP_CHECKS, reason);
return true;
}
I did this because I was trying to keep the exception as narrow as possible, I did not want anybody to call their program "ldconfig" and then avoid the annocheck tests. But obviously I missed the AArch64 symlink case. I will fix this in the next release of annobin.
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: annobin), 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/RHEA-2022:2342