Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1700924 - annobin: annocheck should fail with an executable check
Summary: annobin: annocheck should fail with an executable check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: rawhide
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: 2019-04-17 16:31 UTC by Florian Weimer
Modified: 2019-04-26 00:12 UTC (History)
3 users (show)

Fixed In Version: annobin-8.73-1.fc31 annobin-8.73-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-26 00:12:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2019-04-17 16:31:02 UTC
This:

echo 'int main (void) { return 0; }' > t.c
gcc `rpm --eval "%build_cflags %build_ldflags"` -Wl,-z,execstack t.c
readelf -lW a.out | grep GNU_STACK
annocheck a.out

produces:

  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x10

but no executable stack error from annocheck.

I would have expected an error from annocheck here.

Note that the PT_GNU_STACK program header is obviously not present in ET_REL files.  There, a special note section is used, .note.GNU-stack.  If the section is executable, the stack will be marked executable in the program header.  If the section is absent, the behavior is target-dependent.

Comment 1 Nick Clifton 2019-04-24 11:37:11 UTC
Hi Florian,

  A snafu in the annocheck code - it was assuming that PT_GNU_STACK
  segments could have the execute flag set, instead of clear.  Doh.

  Fixed in: annobin-8.73-1.fc31

Cheers
  Nick

Comment 2 Fedora Update System 2019-04-24 13:27:50 UTC
annobin-8.73-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-30cb514427

Comment 3 Fedora Update System 2019-04-25 00:55:15 UTC
annobin-8.73-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-30cb514427

Comment 4 Fedora Update System 2019-04-26 00:12:48 UTC
annobin-8.73-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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