Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1148591

Summary: avcs generated when libreswan is run to connect to red hat VPN via NM-libreswan
Product: Red Hat Enterprise Linux 7 Reporter: Avesh Agarwal <avagarwa>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: avagarwa, mmalik, sforsber
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:41:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Avesh Agarwal 2014-10-01 19:45:04 UTC
Description of problem:
selinux avcs appear in the system when  libreswan is run to connect to red hat VPN via NM-libreswan.

Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-153.el7_0.11.noarch

libreswan version:
libreswan-3.10-3.el7.x86_64

NetworkManager versions:
NetworkManager-0.9.9.1-42.git20140326.4dba720.el7.x86_64
NetworkManager-libreswan-gnome-0.9.8.0-5.el7.x86_64
NetworkManager-libreswan-0.9.8.0-5.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Configure NM-libreswan to connect to red hat VPN
2. Start the connection establishment.
3.

Actual results:
Following avcs appear:
time->Wed Oct  1 14:53:27 2014
type=SYSCALL msg=audit(1412189607.676:412): arch=c000003e syscall=257 success=no exit=-13 a0=ffffffffffffff9c a1=f2ba50 a2=90800 a3=0 items=0 ppid=2810 pid=2827 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="_stackmanager" exe="/usr/bin/bash" subj=system_u:system_r:ipsec_mgmt_t:s0 key=(null)
type=AVC msg=audit(1412189607.676:412): avc:  denied  { read } for  pid=2827 comm="_stackmanager" name="arch" dev="dm-0" ino=33113 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir


Expected results:
no avc

Additional info:
same avc appear on fedora 20 too.

Comment 2 Milos Malik 2014-10-02 07:16:36 UTC
Could you provide the full path to the directory which the _stackmanager wants to access? inode=33113

Comment 3 Avesh Agarwal 2014-10-03 19:23:31 UTC
(In reply to Milos Malik from comment #2)
> Could you provide the full path to the directory which the _stackmanager
> wants to access? inode=33113

find / -inum 33113
/usr/lib/modules/3.10.0-171.el7.x86_64/kernel/arch

The only line in libreswan that is in ./programs/_stackmanager/_stackmanager.in is following:

modules=$(ls /lib/modules/$(uname -r)/kernel/arch/*/crypto/* 2>/dev/null)

Comment 4 Miroslav Grepl 2014-10-06 11:56:27 UTC
commit 0648c7a934486473667e7af849265be21eb62e45
Author: Miroslav Grepl <mgrepl>
Date:   Mon Oct 6 13:56:04 2014 +0200

    Allow libreswan to connect to VPN via NM-libreswan.

Comment 8 errata-xmlrpc 2015-03-05 10:41:38 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-0458.html