Bug 969561 - SELinux is preventing /usr/libexec/ipsec/addconn from connectto access on the unix_stream_socket /run/pluto/pluto.ctl
SELinux is preventing /usr/libexec/ipsec/addconn from connectto access on the...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-31 15:35 EDT by Sergei LITVINENKO
Modified: 2013-07-24 20:40 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-98.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 20:40:51 EDT
Type: Bug
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 Sergei LITVINENKO 2013-05-31 15:35:00 EDT
Description of problem:

SELinux is preventing /usr/libexec/ipsec/addconn from connectto access on the unix_stream_socket /run/pluto/pluto.ctl


Version-Release number of selected component (if applicable):

selinux-policy-3.11.1-97.fc18.noarch
selinux-policy-targeted-3.11.1-97.fc18.noarch
libreswan-3.3-1.fc18.i686


How reproducible:
100$

Steps to Reproduce:
1. Prepare simple libreswan configuration
2. Start ipsec by `service ipsec start`
3.

Actual results:

[root@homedesk etc]# ipsec auto --up centos6
000 initiating all conns with alias='centos6' 
021 no connection named "centos6"


Expected results:
Connection is up and work


Additional info:

it is possible to add conncetion manually

[root@homedesk ipsec.d]# ipsec auto --add centos6
[root@homedesk ipsec.d]# ipsec auto --up centos6
104 "centos6" #1: STATE_MAIN_I1: initiate
003 "centos6" #1: ignoring unknown Vendor ID payload [4f4568794c64414365636661]
003 "centos6" #1: received Vendor ID payload [Dead Peer Detection]


[root@homedesk log]# sealert -l 186a03a4-49d3-48c7-8ad8-2b00191f62f4
SELinux is preventing /usr/libexec/ipsec/addconn from connectto access on the unix_stream_socket /run/pluto/pluto.ctl.

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

If вы считаете, что addconn следует разрешить доступ connectto к pluto.ctl unix_stream_socket по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
чтобы разрешить доступ, выполните:
# grep addconn /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:ipsec_t:s0
Target Context                system_u:system_r:ipsec_t:s0
Target Objects                /run/pluto/pluto.ctl [ unix_stream_socket ]
Source                        addconn
Source Path                   /usr/libexec/ipsec/addconn
Port                          <Unknown>
Host                          homedesk.homedesk.org.ua
Source RPM Packages           libreswan-3.3-1.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     homedesk.homedesk.org.ua
Platform                      Linux homedesk.homedesk.org.ua
                              3.9.4-200.fc18.i686.PAE #1 SMP Fri May 24 20:24:58
                              UTC 2013 i686 i686
Alert Count                   18
First Seen                    2013-05-30 22:30:56 EEST
Last Seen                     2013-05-31 22:14:33 EEST
Local ID                      186a03a4-49d3-48c7-8ad8-2b00191f62f4

Raw Audit Messages
type=AVC msg=audit(1370027673.733:526): avc:  denied  { connectto } for  pid=16658 comm="addconn" path="/run/pluto/pluto.ctl" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:system_r:ipsec_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1370027673.733:526): arch=i386 syscall=socketcall success=no exit=EACCES a0=3 a1=bfed85c0 a2=b773ddc4 a3=bfed87c0 items=0 ppid=16632 pid=16658 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=addconn exe=/usr/libexec/ipsec/addconn subj=system_u:system_r:ipsec_t:s0 key=(null)

Hash: addconn,ipsec_t,ipsec_t,unix_stream_socket,connectto

audit2allow

#============= ipsec_t ==============
allow ipsec_t self:unix_stream_socket connectto;

audit2allow -R
require {
        type ipsec_t;
}

#============= ipsec_t ==============
ipsec_stream_connect(ipsec_t)
Comment 1 Miroslav Grepl 2013-06-04 08:26:15 EDT
Added.
Comment 2 Fedora Update System 2013-06-27 09:36:49 EDT
selinux-policy-3.11.1-98.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-98.fc18
Comment 3 Fedora Update System 2013-06-28 02:10:43 EDT
Package selinux-policy-3.11.1-98.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-98.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11859/selinux-policy-3.11.1-98.fc18
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-24 20:40:51 EDT
selinux-policy-3.11.1-98.fc18 has been pushed to the Fedora 18 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.