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.

Bug 1809656

Summary: annocheck failure in rpmdiff - golang
Product: Red Hat Enterprise Linux 8 Reporter: Liora Milbaum <lmilbaum>
Component: annobinAssignee: Nick Clifton <nickc>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: dcantrell, fweimer, jbair, law, mcermak, nickc, sgott
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-16 16:09:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Liora Milbaum 2020-03-03 16:01:46 UTC
We ran into an rpmdiff test that needed inspection here: https://rpmdiff.engineering.redhat.com/run/433067

This then lead us to a bug that seemed to point to the exact use case we were seeing: 

https://bugzilla.redhat.com/show_bug.cgi?id=1702613

After doing some research on my side, what I found:

1. rpmdiff workers are running annocheck v8.73, which is 2 releases after the one noted in the above ticket
2. If I run the example listed in the above bug (a simple "Hello World" go program), annocheck identifies is correctly and it passes
3. If I fetch the above build, unpack it and run annocheck against virtctl, I see the same failure locally as rpmdiff.

At this point, either the virtctl program needs adjusted to pass the annocheck test, or a bug needs filed against annocheck to fix whatever is causing annocheck to not properly flag virtctl as a go binary.

Comment 1 Nick Clifton 2020-03-04 14:29:39 UTC
Hi Liora,

> At this point, either the virtctl program needs adjusted to pass the annocheck test, or a bug needs filed against annocheck to fix 
> whatever is causing annocheck to not properly flag virtctl as a go binary.

  Ideally both of these things need to happen.  Annocheck is issuing two FAIL
  results:

    Hardened: /usr/bin/virtctl: FAIL: Build notes were not found for this executable.
    Hardened: /usr/bin/virtctl: FAIL: Entry point instruction is not ENDBR64.

  The first is a bug in annocheck - it should not expect to find annobin notes in
  a compiled GO binary.  The second is really a problem with the GO compiler.  It
  really should support the generation of the ENDBR64 instruction which is a part
  of Intel's Control flow Enforcement Technology - a security feature designed to
  help prevent attackers from using the binary for nefarious purposes.

  I have a local patch to annocheck which fixes the first problem, and changes
  the second FAIL result to a SKIP - on the grounds that the GO compiler is unlikely
  to be fixed any time soon.  Since this is not an urgent problem however I am
  going to hold off committing the patch until 8.3.0.  If you would like to try
  out the fixed annocheck however you can do so by getting the latest version
  of annobin from Fedora rawhide (annobin-9.12-1.fc33)

Cheers
  Nick

Comment 2 Liora Milbaum 2020-03-04 15:15:30 UTC
Thanks Nick for your quick response. Do you have ETA on when rpmdiff tests will be using the annobin with your fixes?

Comment 3 Nick Clifton 2020-03-04 15:21:22 UTC
Hi Liora,

> Do you have ETA on when rpmdiff tests
> will be using the annobin with your fixes?

Hmm, good question.  The short answer is "no".  Rpmdiff normally gets its
binaries from the epel7 branch of Fedora, but the annobin there was updated
to 8.90 last November, and it does not appear to have made it into their
work environment.  I will update epel7 again and then see if I can prod
QE into updating their environment.

Cheers
  Nick

Comment 4 Liora Milbaum 2020-03-04 15:34:30 UTC
Thanks again. Please update when you have more information on this.

Comment 5 Nick Clifton 2020-03-10 10:03:33 UTC
Hi Liora,

> Thanks again. Please update when you have more information on this.

I *think* that the updated annocheck should now be installed on the machines used by rpmdiff.

Cheers
  Nick

Comment 6 Liora Milbaum 2020-03-10 10:07:34 UTC
Nick,

Thanks for the update. Let us check that it solved our issue.

Liora

Comment 9 Nick Clifton 2020-03-16 14:18:40 UTC
(In reply to Liora Milbaum from comment #7)

Hi Liora,

> You can find more information in the following link:
> https://issues.redhat.com/browse/KNIECO-
> 1724?focusedCommentId=13996922&page=com.atlassian.jira.plugin.system.
> issuetabpanels:comment-tabpanel#comment-13996922

Sorry - that gives me:

  "You can't view this issue
   It may have been deleted or you don't have permission to view it."

Can you summarise what is wrong ?  (And confirm that a new version of annocheck is being used)

Cheers
  Nick

Comment 10 Nick Clifton 2020-03-16 14:36:16 UTC
Hi Liora,

>   "You can't view this issue
>    It may have been deleted or you don't have permission to view it."

Ah - my JIRA account was not linked to me Red Hat account.  This is now fixed and I can see the issue.

I think that the problem might be a timing issue.  The rpmdiff results linked to by Stuart was run
on 2020-03-07 but the update to the new version of annobin happened on 2020-03-10.  (I think...).

When I check the rpms with annocheck locally they pass, so I think that if the builds were resubmitted
(or remade with a bumped NVR) then they will pass too.

Cheers
  Nick

Comment 11 Dave Cantrell 2020-03-16 14:53:22 UTC
You can see the version of tools used by the rpmdiff job by clicking View Log.  For this one:

https://rpmdiff.engineering.redhat.com/run/433067/log/

You can see it used annobin-8.73-1.el7.x86_64.  Since you need the newer annobin and that has been deployed to the rpmdiff workers, you can just reschedule that same rpmdiff job -or- do a new build and update the erratum and let it schedule a new rpmdiff job.

Comment 12 Liora Milbaum 2020-03-16 15:17:06 UTC
FAILED -
https://rpmdiff.engineering.redhat.com/run/437374/

Comment 13 Nick Clifton 2020-03-16 15:20:03 UTC
(In reply to Liora Milbaum from comment #12)
> FAILED -
> https://rpmdiff.engineering.redhat.com/run/437374/

But the execshield test passed. :-)

The FAIL is from the Upstream Source test, which I hope is completely unrelated to annocheck.

Comment 14 Liora Milbaum 2020-03-16 15:23:14 UTC
Nick,
You are correct :-)
I have added the 'Rebase' key to the BZ ticket and rescheduled the test.

Comment 15 Liora Milbaum 2020-03-16 15:25:56 UTC
The test is still failing. Is that something you can help me chaise, or, should I file another issue?

Comment 16 Liora Milbaum 2020-03-16 15:33:07 UTC
You can close this issue as resolved. I will chaise the other issue in another stream.
Thank you very much.

Comment 17 Nick Clifton 2020-03-16 16:09:06 UTC
Problem resolved.

Comment 18 Dave Cantrell 2020-03-16 16:34:52 UTC
(In reply to Nick Clifton from comment #13)
> (In reply to Liora Milbaum from comment #12)
> > FAILED -
> > https://rpmdiff.engineering.redhat.com/run/437374/
> 
> But the execshield test passed. :-)
> 
> The FAIL is from the Upstream Source test, which I hope is completely
> unrelated to annocheck.

It is separate.  The result from the test says:

"Upstream version changed from 0.23.3 to 0.26.1 (not OK, because kubevirt is not on the version whitelist and no ET48744-linked bugs have the 'Rebase' keyword)"

It's pretty straightforward.

Comment 19 Liora Milbaum 2020-03-16 17:21:35 UTC
David,
It is straightforward. I have a BZ ticket attached to the advisory with a 'Rebase' keyword. 
rpmdiff ignores it :-(

Comment 20 Red Hat Bugzilla 2023-09-14 05:53:47 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days