Bug 250815 - grub fails to run if selinux is in enforcing mode
grub fails to run if selinux is in enforcing mode
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-03 15:15 EDT by Jarod Wilson
Modified: 2009-01-09 02:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 02:11:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jarod Wilson 2007-08-03 15:15:11 EDT
Description of problem:
Grub can't be run in selinux enforcing mode:

# grub
grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *)
-1)' failed.
Aborted

Some strace output:

mmap2(NULL, 4206592, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_EXECUTABLE|0x40, -1, 0) = -1 EACCES (Permission
denied)
write(2, "grub: asmstub.c:214: grub_stage2"..., 91) = 91
brk(0x8104000)                          = 0x8104000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0

Running with setenforce 0, everything is fine.

(dunno if this shoulda been filed against grub or selinux, I'll leave that to y'all)

Version-Release number of selected component (if applicable):
# rpm -qa grub selinux\*
selinux-policy-3.0.4-3.fc8
grub-0.97-13
selinux-policy-targeted-3.0.4-3.fc8

How reproducible:
Try to run grub or grub-install with selinux in enforcing mode.
Comment 1 Daniel Walsh 2007-08-03 17:03:47 EDT
Fixed in selinux-policy-targeted-3.0.5-1.fc8
Comment 2 tim m 2007-10-28 20:03:48 EDT
I recently experienced the same issue (strace and all), but with fc7 and
selinux-policy-2.6.4-48.fc7 and no fix in current branch as of 10/28/07.  Should
I expect updated || --enable-repo=testing || file new bug?  
Comment 3 Daniel Walsh 2007-10-30 06:50:14 EDT
What avc are you seeing?
Comment 4 tim m 2007-10-30 09:18:21 EDT
avc: denied { execmem } for comm="grub" egid=0 euid=0 exe="/sbin/grub" exit=-13
fsgid=0 fsuid=0 gid=0 items=0 pid=3210 scontext=user_u:system_r:unconfined_t:s0
sgid=0 subj=user_u:system_r:unconfined_t:s0 suid=0 tclass=process
tcontext=user_u:system_r:unconfined_t:s0 tty=pts0 uid=0 

...according to setroubleshoot 1.9.4 (thank you all for that app).
Comment 5 Daniel Walsh 2007-10-30 16:50:10 EDT
setsebool -P allow_execmem=1 

should fix this problem.

Comment 6 Bug Zapper 2008-04-04 09:32:37 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 7 Bug Zapper 2008-11-26 02:38:28 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  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 '8'.

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 8'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 8 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2009-01-09 02:11:53 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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