Bug 1033224 - SELinux is preventing /usr/sbin/fence_virtd from working
Summary: SELinux is preventing /usr/sbin/fence_virtd from working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 983665
TreeView+ depends on / blocked
 
Reported: 2013-11-21 18:02 UTC by Michele Baldessari
Modified: 2014-02-17 21:07 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-74.18.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-17 21:07:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michele Baldessari 2013-11-21 18:02:01 UTC
Description of problem:
Note that there are two denials here one is due to (1) name_bind on udp_sockets
and the other one is for (2) name_connect on tcp_sockets

This affects both F19 and F20. Let me know if I should file a separate bug for F20 as well.

1)
Source Context                system_u:system_r:fenced_t:s0
Target Context                system_u:object_r:zented_port_t:s0
Target Objects                 [ udp_socket ]
Source                        fence_virtd
Source Path                   /usr/sbin/fence_virtd
Port                          1229
Host                          nas.int.rhx
Source RPM Packages           fence-virtd-0.3.0-13.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.11.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     nas.int.rhx
Platform                      Linux nas.int.rhx 3.11.7-200.fc19.x86_64 #1 SMP
                              Mon Nov 4 14:09:03 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-11-21 18:19:59 CET
Last Seen                     2013-11-21 18:19:59 CET
Local ID                      053c0824-a843-4b0c-a134-cac96145313a

Raw Audit Messages
type=AVC msg=audit(1385054399.7:868): avc:  denied  { name_bind } for  pid=16207 comm="fence_virtd" src=1229 scontext=system_u:system_r:fenced_t:s0 tcontext=system_u:object_r:zented_port_t:s0 tclass=udp_socket


type=SYSCALL msg=audit(1385054399.7:868): arch=x86_64 syscall=bind success=yes exit=0 a0=8 a1=7fff165b8270 a2=10 a3=1 items=0 ppid=1 pid=16207 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=fence_virtd exe=/usr/sbin/fence_virtd subj=system_u:system_r:fenced_t:s0 key=(null)

Hash: fence_virtd,fenced_t,zented_port_t,udp_socket,name_bind

2)
Additional Information:
Source Context                system_u:system_r:fenced_t:s0
Target Context                system_u:object_r:zented_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        fence_virtd
Source Path                   /usr/sbin/fence_virtd
Port                          1229
Host                          nas.int.rhx
Source RPM Packages           fence-virtd-0.3.0-13.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.11.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     nas.int.rhx
Platform                      Linux nas.int.rhx 3.11.7-200.fc19.x86_64 #1 SMP
                              Mon Nov 4 14:09:03 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-11-21 18:35:13 CET
Last Seen                     2013-11-21 18:35:13 CET
Local ID                      a96d0c36-d9d3-4fc9-989d-31599945e209

Raw Audit Messages
type=AVC msg=audit(1385055313.386:873): avc:  denied  { name_connect } for  pid=24122 comm="fence_virtd" dest=1229 scontext=system_u:system_r:fenced_t:s0 tcontext=system_u:object_r:zented_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1385055313.386:873): arch=x86_64 syscall=connect success=no exit=EINPROGRESS a0=9 a1=7fffd1a08a00 a2=10 a3=7fffd1a088b4 items=0 ppid=1 pid=24122 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=fence_virtd exe=/usr/sbin/fence_virtd subj=system_u:system_r:fenced_t:s0 key=(null)

Hash: fence_virtd,fenced_t,zented_port_t,tcp_socket,name_connect

Comment 1 Lukas Vrabec 2014-01-16 15:24:24 UTC
Hi, 

First issue I fixed

commit 3e8a2ab67af146f363e083ad1ac08448238749f6
Author: Lukas Vrabec <lvrabec>
Date:   Thu Jan 16 16:15:29 2014 +0100

    Allow fenced_t to bind on zented udp port

and second issue is not a bug, you could allow boolean for this, using:

"# setsebool fenced_can_network_connect=1" 

First bug will be included also in F20.

Comment 2 Michele Baldessari 2014-01-16 15:42:44 UTC
Perfect. Thanks a lot Lukas!

Comment 4 Fedora Update System 2014-02-11 22:09:42 UTC
selinux-policy-3.12.1-74.18.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.18.fc19

Comment 5 Fedora Update System 2014-02-12 14:49:36 UTC
Package selinux-policy-3.12.1-74.18.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.18.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2409/selinux-policy-3.12.1-74.18.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-02-17 21:07:34 UTC
selinux-policy-3.12.1-74.18.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.