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 1259786 - Please update the policy for NetworkManager-libreswan-1.0.6
Summary: Please update the policy for NetworkManager-libreswan-1.0.6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 14:20 UTC by Lubomir Rintel
Modified: 2015-11-19 10:44 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-55.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 10:44:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
avc log (24.46 KB, text/plain)
2015-10-06 09:20 UTC, Vladimir Benes
no flags Details
avc log (20.38 KB, text/plain)
2015-10-06 09:26 UTC, Vladimir Benes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description Lubomir Rintel 2015-09-03 14:20:40 UTC
The fixes based on rawhide-base:

git pull https://github.com/lkundrak/selinux-policy.git lr-libreswan

The top two commits from here https://github.com/lkundrak/selinux-policy/commits/lr-libreswan are relevant:

commit 1bfc73fd4d980c724bdf09461ac9f8e52a8d1a49
Author: Lubomir Rintel <lkundrak>
Date:   Mon Dec 1 00:53:23 2014 +0100

    ipsec: The NM helper needs to read the SAs
    
    Introduced in version 0.995 [f13be802 core: autodetect NEVER_DEFAULT by
    searching kernel IPSec routes]:
    
    https://mail.gnome.org/archives/commits-list/2014-October/msg04443.html
    
    Denials (when activating a connection via NetworkManager):
    
    type=AVC msg=audit(1441262481.216:183): avc:  denied  { create } for  pid=4556 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.216:184): avc:  denied  { setopt } for  pid=4556 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.216:185): avc:  denied  { bind } for  pid=4556 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.216:186): avc:  denied  { nlmsg_read } for  pid=4556 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.506:189): avc:  denied  { create } for  pid=4587 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.507:190): avc:  denied  { setopt } for  pid=4587 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.507:191): avc:  denied  { bind } for  pid=4587 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket
    type=AVC msg=audit(1441262481.507:192): avc:  denied  { nlmsg_read } for  pid=4587 comm="nm-libreswan-se" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:system_r:ipsec_mgmt_t:s0 tclass=netlink_xfrm_socket

commit 9dc7ff453b0f02548947a838b12ed19f0056ab45
Author: Lubomir Rintel <lkundrak>
Date:   Mon Dec 1 00:50:54 2014 +0100

    ipsec: Allow ipsec management to create ptys
    
    The NM helper feeds the password to pluto via a pty to make it think it's
    interactive.
    
    Denials (when activating a connection via NetworkManager):
    
    type=AVC msg=audit(1441262480.696:173): avc:  denied  { read write } for  pid=4500 comm="nm-libreswan-se" name="ptmx" dev="devtmpfs" ino=1138 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file
    type=AVC msg=audit(1441262480.696:173): avc:  denied  { open } for  pid=4500 comm="nm-libreswan-se" path="/dev/ptmx" dev="devtmpfs" ino=1138 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file
    type=AVC msg=audit(1441262480.696:174): avc:  denied  { getattr } for  pid=4500 comm="nm-libreswan-se" name="/" dev="devpts" ino=1 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=filesystem
    type=AVC msg=audit(1441262480.697:175): avc:  denied  { ioctl } for  pid=4500 comm="nm-libreswan-se" path="/dev/ptmx" dev="devtmpfs" ino=1138 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file
    type=AVC msg=audit(1441262480.697:176): avc:  denied  { open } for  pid=4500 comm="nm-libreswan-se" path="/dev/pts/4" dev="devpts" ino=7 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=chr_file

Comment 3 Lukas Vrabec 2015-09-22 20:38:12 UTC
Fixes by Lubo are in fedora.

Comment 7 Vladimir Benes 2015-10-05 08:52:08 UTC
still seeing:
type=SYSCALL msg=audit(1444034486.190:1270): arch=c000003e syscall=165 success=no exit=-13 a0=440894 a1=43b461 a2=43c5ed a3=84000 items=0 ppid=1 pid=903 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ip" exe="/usr/sbin/ip" subj=system_u:system_r:ifconfig_t:s0 key=(null)
type=AVC msg=audit(1444034486.190:1270): avc:  denied  { mounton } for  pid=903 comm="ip" path="/" dev="dm-0" ino=128 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=dir

and unable to bring up libreswan connection

test machine available upon request

Comment 8 Miroslav Grepl 2015-10-05 09:12:40 UTC
(In reply to Vladimir Benes from comment #7)
> still seeing:
> type=SYSCALL msg=audit(1444034486.190:1270): arch=c000003e syscall=165
> success=no exit=-13 a0=440894 a1=43b461 a2=43c5ed a3=84000 items=0 ppid=1
> pid=903 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
> fsgid=0 tty=(none) ses=4294967295 comm="ip" exe="/usr/sbin/ip"
> subj=system_u:system_r:ifconfig_t:s0 key=(null)
> type=AVC msg=audit(1444034486.190:1270): avc:  denied  { mounton } for 
> pid=903 comm="ip" path="/" dev="dm-0" ino=128
> scontext=system_u:system_r:ifconfig_t:s0
> tcontext=system_u:object_r:root_t:s0 tclass=dir
> 
> and unable to bring up libreswan connection
> 
> test machine available upon request

That's strange. Could you try to run it in permissive and

#ausearch -m avc,user_avc -ts recent

Comment 9 Vladimir Benes 2015-10-06 09:20:54 UTC
Created attachment 1080185 [details]
avc log

this probably mens it's from racoon server and not libreswan

Comment 10 Vladimir Benes 2015-10-06 09:26:37 UTC
Created attachment 1080186 [details]
avc log

actually this is the correct one from -56 version

Comment 11 Vladimir Benes 2015-10-06 09:43:04 UTC
moving back to ON_QA as current avc is related to ipsec-tools (and racoon server that serves libreswan tests)

Comment 14 errata-xmlrpc 2015-11-19 10:44:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2300.html


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