Bug 839813 - grub2-tools missing prelink excludes to avoid SELinux execstack limits
Summary: grub2-tools missing prelink excludes to avoid SELinux execstack limits
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-12 22:40 UTC by Scott Shambarger
Modified: 2013-07-10 23:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-10 23:55:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Scott Shambarger 2012-07-12 22:40:37 UTC
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):
selinux-policy-3.10.0-134
prelink-0.4.6-5
grub2-tools-2.0-0.37.beta6

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 18:28:22 UTC
Should be fixed in 2.00-4 (in f18)

Comment 2 Fedora End Of Life 2013-07-04 07:04:35 UTC
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 23:55:11 UTC
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.