Bug 1005939 - SELinux is preventing /usr/lib/virtualbox/VirtualBox from using the 'execstack' accesses on a process.
SELinux is preventing /usr/lib/virtualbox/VirtualBox from using the 'execstac...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-09 13:46 EDT by Moez Roy
Modified: 2013-09-10 02:28 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-10 02:28:27 EDT
Type: ---
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 Moez Roy 2013-09-09 13:46:47 EDT
Description of problem:
VirtualBox Beta/Release Candidate Feedback: https://forums.virtualbox.org/viewforum.php?f=15
SELinux is preventing /usr/lib/virtualbox/VirtualBox from using the 'execstack' accesses on a process.

*****  Plugin allow_execstack (53.1 confidence) suggests  ********************

If you believe that 
should not require execstack
Then you should clear the execstack flag and see if /usr/lib/virtualbox/VirtualBox works correctly.
Report this as a bug on None.
You can clear the exestack flag by executing:
execstack -c None

*****  Plugin catchall_boolean (42.6 confidence) suggests  *******************

If you want to allow unconfined executables to make their stack executable.  This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla
Then you must tell SELinux about this by enabling the 'selinuxuser_execstack' boolean.
You can read 'unconfined_selinux' man page for more details.
setsebool -P selinuxuser_execstack 1

*****  Plugin catchall (5.76 confidence) suggests  ***************************

If you believe that VirtualBox should be allowed execstack access on processes labeled unconfined_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep VirtualBox /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Objects                 [ process ]
Source                        VirtualBox
Source Path                   /usr/lib/virtualbox/VirtualBox
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           VirtualBox-4.3-4.3.0_BETA1_88249_fedora18-1.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.1.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.10-200.fc19.x86_64 #1 SMP Thu
                              Aug 29 19:05:45 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-09 10:43:31 PDT
Last Seen                     2013-09-09 10:43:31 PDT
Local ID                      76fa4169-d8f2-4afd-86d6-4ba88c5c3443

Raw Audit Messages
type=AVC msg=audit(1378748611.55:481): avc:  denied  { execstack } for  pid=3968 comm="VirtualBox" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

type=SYSCALL msg=audit(1378748611.55:481): arch=x86_64 syscall=mprotect success=no exit=EACCES a0=7fff4fe39000 a1=1000 a2=1000007 a3=0 items=0 ppid=3967 pid=3968 auid=1000 uid=1000 gid=1001 euid=1000 suid=1000 fsuid=1000 egid=1001 sgid=1001 fsgid=1001 ses=1 tty=(none) comm=VirtualBox exe=/usr/lib/virtualbox/VirtualBox subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash: VirtualBox,unconfined_t,unconfined_t,process,execstack

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.10-200.fc19.x86_64
type:           libreport
Comment 1 Moez Roy 2013-09-09 13:55:11 EDT
[user@localhost ~]$ execstack -q /usr/lib/virtualbox/VirtualBox
execstack: cannot open "/usr/lib/virtualbox/VirtualBox": Permission denied
[user@localhost ~]$ sudo execstack -q /usr/lib/virtualbox/VirtualBox
[sudo] password for user: 
- /usr/lib/virtualbox/VirtualBox
[user@localhost ~]$
Comment 2 Miroslav Grepl 2013-09-10 02:28:27 EDT
You can run

# setsebool -P selinuxuser_execstack 1

to make this working. There is a library which needs to clear the exestack flag.

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