Bug 1003195 - SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the netlink_kobject_uevent_socket .
Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6a529d7bb86be4f66d04f64c069...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-31 17:39 UTC by Cole Robinson
Modified: 2013-09-12 01:53 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-74.2.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-12 01:53:24 UTC
Type: ---


Attachments (Terms of Use)

Description Cole Robinson 2013-08-31 17:39:14 UTC
Description of problem:
I'm using rawhide qemu 1.6 on F19. Warning comes from starting a VM with an assigned host USB device. Also see warnings about create, setopt, and bind on the same socket. Probably due to qemu's recent switch to using libusb for the host bits.
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the netlink_kobject_uevent_socket .

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-system-x86_64 should be allowed getattr access on the  netlink_kobject_uevent_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-system-x86 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c144,c227
Target Context                system_u:system_r:svirt_t:s0:c144,c227
Target Objects                 [ netlink_kobject_uevent_socket ]
Source                        qemu-system-x86
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-1.6.0-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.7-200.fc19.x86_64 #1 SMP Thu
                              Aug 15 23:19:45 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-31 13:34:03 EDT
Last Seen                     2013-08-31 13:34:03 EDT
Local ID                      d5040eb2-9ab9-426d-be97-502fe0d4deb8

Raw Audit Messages
type=AVC msg=audit(1377970443.799:2749): avc:  denied  { getattr } for  pid=4673 comm="qemu-system-x86" scontext=system_u:system_r:svirt_t:s0:c144,c227 tcontext=system_u:system_r:svirt_t:s0:c144,c227 tclass=netlink_kobject_uevent_socket


type=SYSCALL msg=audit(1377970443.799:2749): arch=x86_64 syscall=getsockname success=yes exit=0 a0=19 a1=7fffa8209970 a2=7fffa820996c a3=7fffa8208910 items=0 ppid=1 pid=4673 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 ses=4294967295 tty=(none) comm=qemu-system-x86 exe=/usr/bin/qemu-system-x86_64 subj=system_u:system_r:svirt_t:s0:c144,c227 key=(null)

Hash: qemu-system-x86,svirt_t,svirt_t,netlink_kobject_uevent_socket,getattr

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.7-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-09-04 18:18:42 UTC
934c35ef00c83636b40ecf385c5dc05a31367118 fixes this in git.  Please back port virt.te to F19

Comment 2 Miroslav Grepl 2013-09-05 08:12:50 UTC
Has been added.

Comment 3 Fedora Update System 2013-09-09 07:54:03 UTC
selinux-policy-3.12.1-74.2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.2.fc19

Comment 4 Fedora Update System 2013-09-09 23:57:08 UTC
Package selinux-policy-3.12.1-74.2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-74.2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-16231/selinux-policy-3.12.1-74.2.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-09-12 01:53:24 UTC
selinux-policy-3.12.1-74.2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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