Bug 1141879 - SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the chr_file /dev/net/tun.
Summary: SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the chr_file ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Privoznik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0f404977d1a7d88a823c1d40cb1...
: 1139662 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-15 16:02 UTC by Michal Kovarik
Modified: 2014-09-23 04:20 UTC (History)
16 users (show)

Fixed In Version: libvirt-1.2.8-4.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-23 04:20:43 UTC
Type: ---


Attachments (Terms of Use)

Description Michal Kovarik 2014-09-15 16:02:35 UTC
Description of problem:
Start virtual machine in virt-manager. 
SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the chr_file /dev/net/tun.

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

If you believe that openvpn should be allowed read access on the tun chr_file 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 openvpn /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:openvpn_t:s0
Target Context                system_u:object_r:svirt_image_t:s0:c277,c814
Target Objects                /dev/net/tun [ chr_file ]
Source                        openvpn
Source Path                   /usr/sbin/openvpn
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openvpn-2.3.4-4.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-79.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.1-301.mst.fc21.x86_64 #1 SMP
                              Tue Aug 26 02:24:06 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-09-15 17:58:01 CEST
Last Seen                     2014-09-15 17:58:01 CEST
Local ID                      2aba6d08-ad09-45de-a343-330c17fe0bcb

Raw Audit Messages
type=AVC msg=audit(1410796681.14:23085): avc:  denied  { read } for  pid=2240 comm="openvpn" path="/dev/net/tun" dev="devtmpfs" ino=154 scontext=system_u:system_r:openvpn_t:s0 tcontext=system_u:object_r:svirt_image_t:s0:c277,c814 tclass=chr_file permissive=0


type=SYSCALL msg=audit(1410796681.14:23085): arch=x86_64 syscall=read success=no exit=EACCES a0=5 a1=7f70260eba84 a2=5fc a3=7f70260dad80 items=0 ppid=1 pid=2240 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=openvpn exe=/usr/sbin/openvpn subj=system_u:system_r:openvpn_t:s0 key=(null)

Hash: openvpn,openvpn_t,svirt_image_t,chr_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-79.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.1-301.mst.fc21.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-09-16 11:54:41 UTC
Did we revert changes causing these issues?

Comment 2 Cole Robinson 2014-09-16 13:14:50 UTC
Michal, has there been any ideas/progress on fixing this? I know there's a few bugs kicking around just not sure of the status

Comment 3 Cole Robinson 2014-09-18 12:43:38 UTC
*** Bug 1139662 has been marked as a duplicate of this bug. ***

Comment 4 Michal Privoznik 2014-09-18 14:20:59 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2014-September/msg01163.html

Comment 5 Fedora Update System 2014-09-18 20:49:20 UTC
libvirt-1.2.8-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libvirt-1.2.8-4.fc21

Comment 6 Fedora Update System 2014-09-19 17:44:45 UTC
Package libvirt-1.2.8-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-1.2.8-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11111/libvirt-1.2.8-4.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-09-23 04:20:43 UTC
libvirt-1.2.8-4.fc21 has been pushed to the Fedora 21 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.