This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2151899 - annocheck reports that no compiled code found for thin_metadata_pack and thin_metadata_unpack binaries
Summary: annocheck reports that no compiled code found for thin_metadata_pack and thin...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Marian Csontos
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-08 14:09 UTC by Gabriel Gaspar Becker
Modified: 2024-01-22 04:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-23 18:48:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-8303 0 None Migrated None 2023-09-23 18:48:23 UTC
Red Hat Issue Tracker RHELPLAN-141676 0 None None None 2023-02-06 16:27:45 UTC

Description Gabriel Gaspar Becker 2022-12-08 14:09:29 UTC
Description of problem:

Attempting to test if thin_metadata_pack|thin_metadata_unpack binaries were properly built with stack protection via -fstack-protector-strong yields skip: stack-prot test because no compiled code found.

Version-Release number of selected component (if applicable):

RHEL-9.0 packages:
device-mapper-persistent-data-0.9.0-12.el9.x86_64
annobin-annocheck-10.54-2.el9.x86_64

RHEL-9.2 packages:
device-mapper-persistent-data-0.9.0-13.el9.x86_64
annobin-annocheck-10.73-3.el9.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf install -y annobin-annocheck device-mapper-persistent-data
2. dnf debuginfo-install -y device-mapper-persistent-data
3. rpm -ql device-mapper-persistent-data | grep /usr/sbin/ | while read f ; do test -L $f || echo $f ; done | xargs -- annocheck --verbose --skip-all --test-stack-prot

Actual results:

RHEL-9.0
annocheck: Version 10.54.
Hardened: /usr/sbin/pdata_tools: PASS: stack-prot test 
Hardened: /usr/sbin/pdata_tools: Overall: PASS.
Hardened: /usr/sbin/thin_metadata_pack: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/sbin/thin_metadata_pack: skip: stack-prot test because no compiled code found 
Hardened: /usr/sbin/thin_metadata_pack: Overall: PASS.
Hardened: /usr/sbin/thin_metadata_unpack: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/sbin/thin_metadata_unpack: skip: stack-prot test because no compiled code found 
Hardened: /usr/sbin/thin_metadata_unpack: Overall: PASS.


RHEL-9.2
annocheck: Version 10.73.
Hardened: /usr/sbin/pdata_tools: PASS: stack-prot test 
Hardened: /usr/sbin/pdata_tools: Overall: PASS.
Hardened: /usr/sbin/thin_metadata_pack: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/sbin/thin_metadata_pack: PASS: stack-prot test 
Hardened: /usr/sbin/thin_metadata_pack: Overall: PASS.
Hardened: /usr/sbin/thin_metadata_unpack: info: assembler built by GCC detected - treating as pure assembler.
Hardened: /usr/sbin/thin_metadata_unpack: skip: stack-prot test because no compiled code found 
Hardened: /usr/sbin/thin_metadata_unpack: Overall: PASS.

Expected results:
No "skip: stack-prot test because no compiled code found" on binaries.

Additional info:

Adding Nick to Cc in case this turns out to be an issue in annocheck itself.

Comment 1 Nick Clifton 2022-12-08 17:14:57 UTC
This is not really an error.  Annocheck has deduced that the thin_metadata_unpack binary does not contain any compiled code, and therefore does not need protection from stack clash attacks.

The newest version of annocheck (10.94) produces slightly different text, but overall the result is the same:

  annocheck: Version 10.94.
  [...]
  Hardened: ./usr/sbin/thin_metadata_unpack: info: assembler built by GCC detected - treating as pure assembler.
  Hardened: ./usr/sbin/thin_metadata_unpack: skip: stack-prot test because no code present - therefore no stack protection needed 
  Hardened: ./usr/sbin/thin_metadata_unpack: Overall: PASS.

Comment 2 Jan Pazdziora (Red Hat) 2022-12-08 20:19:27 UTC
Hello maintainers, does

# file /usr/sbin/thin_metadata_pack
/usr/sbin/thin_metadata_pack: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ff9f19e5bf68dadf34b05b439818f7d670287bcf, for GNU/Linux 3.2.0, stripped

contain some compiled code or not? I checked build.log but I couldn't find an explicit line where that binary is built / linked.

Comment 4 Nick Clifton 2022-12-09 16:00:59 UTC
Just to be clear, whilst the device-mapper-persistent-data package may contain code written in Rust, the two binaries which are producing problematic annocheck results - thin_metadata_pack and thin_metadata_unpack - do not contain any code.  (At least none that I can find).

Comment 5 Jan Pazdziora (Red Hat) 2023-02-06 14:12:36 UTC
For the record, annocheck 11.05 reports

  skip: stack-prot test because sources compiled as if they were assembler are not checked by this test
  skip: pic test because sources compiled as if they were assembler are not checked

Hello LVM / device-mapper maintainers, is this assessment of these two binaries by annocheck correct?

Comment 6 Joe Thornber 2023-02-06 16:26:38 UTC
Those two tools in v0.9 are written in Rust.  I don't know why your annocheck tool objects to them.

The latest v1.0 version of thinp tools contains only Rust tools, so you may get more of these messages.

Comment 7 Jan Pazdziora (Red Hat) 2023-02-06 16:31:37 UTC
Thanks for chiming in, Joe. Can you confirm Nick's conclusion from comment 4 that those two binaries do not contain any code?

Comment 8 Joe Thornber 2023-02-06 16:34:05 UTC
Let me get Marian (the packager) to double check for you.  There certainly should be code in there.

Comment 9 RHEL Program Management 2023-09-23 18:36:30 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 10 RHEL Program Management 2023-09-23 18:48:29 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 11 Red Hat Bugzilla 2024-01-22 04:25:25 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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