Bug 1002606 - SELinux is preventing /usr/sbin/ovsdb-server from 'write' accesses on the directory /tmp.
SELinux is preventing /usr/sbin/ovsdb-server from 'write' accesses on the dir...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:1434b9a2d2f10375be37e981d08...
:
Depends On:
Blocks: 1005824 1005827
  Show dependency treegraph
 
Reported: 2013-08-29 10:13 EDT by Thomas Graf
Modified: 2014-06-18 04:32 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-74.1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1005824 1005827 (view as bug list)
Environment:
Last Closed: 2013-09-07 20:36:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Graf 2013-08-29 10:13:17 EDT
Description of problem:
Install openvswitch-1.11.0-1.fc19.x86_64.rpm, start of the openvswitch service will trigger the error.
SELinux is preventing /usr/sbin/ovsdb-server from 'write' accesses on the directory /tmp.

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

If you believe that ovsdb-server should be allowed write access on the tmp directory 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 ovsdb-server /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:openvswitch_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                /tmp [ dir ]
Source                        ovsdb-server
Source Path                   /usr/sbin/ovsdb-server
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openvswitch-1.11.0-1.fc19.x86_64
Target RPM Packages           filesystem-3.2-13.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-71.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-29 16:07:12 CEST
Last Seen                     2013-08-29 16:07:12 CEST
Local ID                      bd5057aa-4ab2-42bc-93fd-9e787268ea35

Raw Audit Messages
type=AVC msg=audit(1377785232.936:1232): avc:  denied  { write } for  pid=27979 comm="ovsdb-server" name="/" dev="tmpfs" ino=1618 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir


type=AVC msg=audit(1377785232.936:1232): avc:  denied  { add_name } for  pid=27979 comm="ovsdb-server" name="tmpfrAvoOz" scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir


type=AVC msg=audit(1377785232.936:1232): avc:  denied  { create } for  pid=27979 comm="ovsdb-server" name="tmpfrAvoOz" scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file


type=AVC msg=audit(1377785232.936:1232): avc:  denied  { write open } for  pid=27979 comm="ovsdb-server" path="/tmp/tmpfrAvoOz" dev="tmpfs" ino=8905743 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1377785232.936:1232): arch=x86_64 syscall=open success=yes exit=E2BIG a0=7fffafe3c7d0 a1=c2 a2=180 a3=6 items=0 ppid=27863 pid=27979 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=ovsdb-server exe=/usr/sbin/ovsdb-server subj=system_u:system_r:openvswitch_t:s0 key=(null)

Hash: ovsdb-server,openvswitch_t,tmp_t,dir,write

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.7-200.fc19.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-08-29 10:34:07 EDT
We should allow this but openvswitch thould not be writing any thing in /tmp, it should use /run.

Priv apps writing to /tmp is just wrong.
Comment 2 Thomas Graf 2013-08-29 10:38:07 EDT
(In reply to Daniel Walsh from comment #1)
> We should allow this but openvswitch thould not be writing any thing in
> /tmp, it should use /run.
> 
> Priv apps writing to /tmp is just wrong.

Agreed, we are preparing upstream patches to address this but the 1.11.0 can't be fixed anymore and must still be functional.
Comment 3 Fedora Update System 2013-09-03 15:57:08 EDT
selinux-policy-3.12.1-74.1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.1.fc19
Comment 4 Fedora Update System 2013-09-04 21:38:36 EDT
Package selinux-policy-3.12.1-74.1.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.1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15819/selinux-policy-3.12.1-74.1.fc19
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-09-07 20:36:35 EDT
selinux-policy-3.12.1-74.1.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.