RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1005824 - SELinux is preventing /usr/sbin/ovsdb-server from 'write' accesses on the directory /tmp.
Summary: SELinux is preventing /usr/sbin/ovsdb-server from 'write' accesses on the dir...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard: abrt_hash:1434b9a2d2f10375be37e981d08...
Depends On: 1002606 1005827
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-09 12:55 UTC by Thomas Graf
Modified: 2014-06-18 08:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1002606
Environment:
Last Closed: 2014-06-13 12:07:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Graf 2013-09-09 12:55:39 UTC
+++ This bug was initially created as a clone of Bug #1002606 +++

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

--- Additional comment from Daniel Walsh on 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.

--- Additional comment from Thomas Graf on 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.

--- Additional comment from Fedora Update System on 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

--- Additional comment from Fedora Update System on 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).

--- Additional comment from Fedora Update System on 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.

Comment 2 Miroslav Grepl 2013-09-09 17:49:54 UTC
We should have fixes in the latest RHEL7.

Comment 6 Ludek Smid 2014-06-13 12:07:07 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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