Bug 839813 - grub2-tools missing prelink excludes to avoid SELinux execstack limits
grub2-tools missing prelink excludes to avoid SELinux execstack limits
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-12 18:40 EDT by Scott Shambarger
Modified: 2013-07-10 19:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-10 19:55:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Scott Shambarger 2012-07-12 18:40:37 EDT
Description of problem:
prelink with SELinux enforcing and allow_execstack off causes prelink warnings and SELinux violations.

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

How reproducible:
Whenever prelink cron runs

Steps to Reproduce:
1. SELinux enforcing, allow_execstack off
2. Allow prelink update cron to run
3. Check audit2allow -b and prelink.log to see errors
Actual results:
Prelink complains that it can't load the shared libraries, eg:
/usr/sbin/prelink: /usr/bin/grub2-mkrelpath: Could not parse `/usr/bin/grub2-mkrelpath: error while loading shared libraries: /usr/bin/grub2-mkrelpath: cannot enable executable stack as shared object requires: Permission denied'

SELinux complains about violations, eg:
type=AVC msg=audit(1342132455.729:16995): avc:  denied  { execstack } for  pid=9665 comm="ld-linux-x86-64" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

Expected results:
No warnings or errors.

Additional info:
Since these are not-performance sensitive executables, the easiest solution is to blacklist them from prelink.  This would be as simple as dropping a file into /etc/prelink.conf.d/grub2.conf (creating dir if prelink not already installed), with the following contents:

# these have execstack, and break under selinux
-b /usr/bin/grub2-script-check
-b /usr/bin/grub2-mkrelpath
-b /usr/bin/grub2-fstest
-b /usr/sbin/grub2-bios-setup
-b /usr/sbin/grub2-probe
-b /usr/sbin/grub2-sparc64-setup

This bug appears to be a result of 731111 (grub 2 depends on executable stacks), which doesn't appear to be close to being resolved yet :)
Comment 1 Peter Jones 2012-08-08 14:28:22 EDT
Should be fixed in 2.00-4 (in f18)
Comment 2 Fedora End Of Life 2013-07-04 03:04:35 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Scott Shambarger 2013-07-10 19:55:11 EDT
This is fixed in F18, and F17 is nearing EOL, so closing as wontfix.

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