Bug 1016326 - SELinux is preventing /usr/bin/qemu-system-x86_64 from 'attach_queue' accesses on the tun_socket .
Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from 'attach_queue' accesse...
Keywords:
Status: CLOSED DUPLICATE of bug 1147057
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fa97a3f8f14e8107bddc0c66f5d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 23:07 UTC by Cole Robinson
Modified: 2016-04-26 13:35 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-07 15:35:31 UTC
Type: ---


Attachments (Terms of Use)

Description Cole Robinson 2013-10-07 23:07:02 UTC
Description of problem:
Configured multiqueue virtio-net with libvirt, then ran this inside the guest:

ethtool -L eth0 combined 4

Where there should be 4 tap FDs allocated to the guest for each queue. FWIW I think this is supposed to work
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'attach_queue' accesses on the tun_socket .

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

If you believe that qemu-system-x86_64 should be allowed attach_queue access on the  tun_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:c194,c501
Target Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Objects                 [ tun_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-8.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-83.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.3-301.fc20.x86_64 #1 SMP Thu
                              Oct 3 00:57:21 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-10-07 19:04:31 EDT
Last Seen                     2013-10-07 19:04:31 EDT
Local ID                      a137a3fd-1922-4b2d-ba88-b30cd8472aa0

Raw Audit Messages
type=AVC msg=audit(1381187071.716:2194): avc:  denied  { attach_queue } for  pid=27690 comm="qemu-system-x86" scontext=system_u:system_r:svirt_t:s0:c194,c501 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=tun_socket


type=SYSCALL msg=audit(1381187071.716:2194): arch=x86_64 syscall=ioctl success=yes exit=0 a0=1e a1=400454d9 a2=7feb9926d850 a3=0 items=0 ppid=1 pid=27690 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:c194,c501 key=(null)

Hash: qemu-system-x86,svirt_t,virtd_t,tun_socket,attach_queue

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.3-301.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-10-09 14:10:26 UTC
I think libvirt would need to relabel the tun_socket to match the svirt_t label to make this secure.

Comment 2 Cole Robinson 2014-10-07 15:35:31 UTC

*** This bug has been marked as a duplicate of bug 1147057 ***


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