Bug 574138 - SELinux is preventing /sbin/reboot "execute" access on /sbin/shutdown.
Summary: SELinux is preventing /sbin/reboot "execute" access on /sbin/shutdown.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:07445db028d...
: 574919 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-16 17:59 UTC by José Matos
Modified: 2010-03-26 13:19 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.7.15-4.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-25 22:29:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description José Matos 2010-03-16 17:59:28 UTC
Summary:

SELinux is preventing /sbin/reboot "execute" access on /sbin/shutdown.

Detailed Description:

SELinux denied access requested by poweroff. It is not expected that this access
is required by poweroff and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:shutdown_exec_t:s0
Target Objects                /sbin/shutdown [ file ]
Source                        poweroff
Source Path                   /sbin/reboot
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           upstart-0.6.5-3.fc13
Target RPM Packages           upstart-0.6.5-3.fc13
Policy RPM                    selinux-policy-3.7.14-3.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33-1.fc13.x86_64 #1 SMP Wed Feb
                              24 19:55:32 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Tue 16 Mar 2010 03:36:33 PM WET
Last Seen                     Tue 16 Mar 2010 03:36:33 PM WET
Local ID                      6c65c254-9362-407a-8195-76cbb436b985
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1268753793.248:19602): avc:  denied  { execute } for  pid=15879 comm="poweroff" name="shutdown" dev=dm-0 ino=7080 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shutdown_exec_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1268753793.248:19602): arch=c000003e syscall=59 success=no exit=-13 a0=401d98 a1=7fff469aa750 a2=7fff469aa888 a3=3e9738014c items=0 ppid=1365 pid=15879 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="poweroff" exe="/sbin/reboot" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,poweroff,xdm_t,shutdown_exec_t,file,execute
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t shutdown_exec_t:file execute;

Comment 1 Daniel Walsh 2010-03-16 20:10:15 UTC
Miroslav add

optional_policy(`
	shutdown_domtrans(xdm_t)
')
to F12.

You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.7.14-5.fc13.noarch

Comment 2 José Matos 2010-03-18 20:10:33 UTC
Updating to selinux-policy and selinux-policy-targeted 3.7.15-1.fc13 from koji fixed this issue.

Thanks for the hint.

Comment 3 Miroslav Grepl 2010-03-19 06:35:12 UTC
*** Bug 574919 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2010-03-23 13:33:07 UTC
selinux-policy-3.7.15-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.15-4.fc13

Comment 5 Fedora Update System 2010-03-24 00:47:18 UTC
selinux-policy-3.7.15-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.15-4.fc13

Comment 6 Peter Gückel 2010-03-24 22:26:45 UTC
Yes, it now works fine.

Closed. Solved.

Comment 7 Daniel Walsh 2010-03-25 17:37:49 UTC
Please update karma.

Comment 8 Peter Gückel 2010-03-25 22:03:25 UTC
I don't see a link for that. Is that above where is says priority and asks for votes (whatever that is supposed to be)?

Comment 9 Fedora Update System 2010-03-25 22:29:01 UTC
selinux-policy-3.7.15-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Daniel Walsh 2010-03-26 13:19:17 UTC
Peter, you click on the link above and add an update message saying you like the package.  (Engineers see this as karma.)  Once a package gets three good karma, without a bad karma, it gets pushed to release.


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