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 854671 - selinux avcs when running openswan on a system with fips enabled
Summary: selinux avcs when running openswan on a system with fips enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-05 14:05 UTC by Avesh Agarwal
Modified: 2013-02-21 08:28 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.7.19-168.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:28:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0314 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-02-20 20:35:01 UTC

Description Avesh Agarwal 2012-09-05 14:05:25 UTC
Description of problem:
When running openswan daemon pluto on a rhel6.2 system with fips enabled, I notice following avcs:

time->Tue Sep  4 14:58:59 2012
type=SYSCALL msg=audit(1346785139.015:23478): arch=c000003e syscall=4
success=yes exit=0 a0=7f84b60d35d0 a1=7fff9fd48200 a2=7fff9fd48200 a3=1a
items=0 ppid=10062 pid=10066 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0
egid=0 sgid=0 fsgid=0 tty=pts0 ses=1245 comm="pluto"
exe="/usr/libexec/ipsec/pluto" subj=unconfined_u:system_r:ipsec_t:s0
key=(null)
type=AVC msg=audit(1346785139.015:23478): avc:  denied  { getattr } for 
pid=10066 comm="pluto" path="/usr/sbin/prelink" dev=dm-0 ino=1189939
scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=system_u:object_r:prelink_exec_t:s0 tclass=file
----
time->Tue Sep  4 14:58:59 2012
type=SYSCALL msg=audit(1346785139.015:23479): arch=c000003e syscall=59
success=yes exit=0 a0=7f84b60d35d0 a1=7f84b60d3600 a2=7fff9fd491d0
a3=7fff9fd47f50 items=0 ppid=10066 pid=10069 auid=0 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1245 comm="prelink"
exe="/usr/sbin/prelink" subj=unconfined_u:system_r:ipsec_t:s0 key=(null)
type=AVC msg=audit(1346785139.015:23479): avc:  denied  {
execute_no_trans } for  pid=10069 comm="pluto" path="/usr/sbin/prelink"
dev=dm-0 ino=1189939 scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=system_u:object_r:prelink_exec_t:s0 tclass=file
type=AVC msg=audit(1346785139.015:23479): avc:  denied  { read open }
for  pid=10069 comm="pluto" name="prelink" dev=dm-0 ino=1189939
scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=system_u:object_r:prelink_exec_t:s0 tclass=file
type=AVC msg=audit(1346785139.015:23479): avc:  denied  { execute } for 
pid=10069 comm="pluto" name="prelink" dev=dm-0 ino=1189939
scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=system_u:object_r:prelink_exec_t:s0 tclass=file
----
time->Tue Sep  4 14:58:59 2012
type=SYSCALL msg=audit(1346785139.015:23480): arch=c000003e syscall=1
success=yes exit=162776 a0=1 a1=7f82d44bf000 a2=27bd8 a3=2 items=0
ppid=10066 pid=10069 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
sgid=0 fsgid=0 tty=pts0 ses=1245 comm="prelink" exe="/usr/sbin/prelink"
subj=unconfined_u:system_r:ipsec_t:s0 key=(null)
type=AVC msg=audit(1346785139.015:23480): avc:  denied  { write } for 
pid=10069 comm="prelink" path="pipe:[251277]" dev=pipefs ino=251277
scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=unconfined_u:system_r:ipsec_t:s0 tclass=fifo_file
----
time->Tue Sep  4 14:58:59 2012
type=SYSCALL msg=audit(1346785139.017:23481): arch=c000003e syscall=93
success=yes exit=0 a0=1 a1=0 a2=0 a3=2 items=0 ppid=10066 pid=10069
auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0
ses=1245 comm="prelink" exe="/usr/sbin/prelink"
subj=unconfined_u:system_r:ipsec_t:s0 key=(null)
type=AVC msg=audit(1346785139.017:23481): avc:  denied  { setattr } for 
pid=10069 comm="prelink" name="" dev=pipefs ino=251277
scontext=unconfined_u:system_r:ipsec_t:s0
tcontext=unconfined_u:system_r:ipsec_t:s0 tclass=fifo_file

Version-Release number of selected component (if applicable):
kernel-2.6.32-220.4.2.el6.x86_64
selinux-policy-3.7.19-126.el6.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Boot a rhel6.2 system in fips mode.
2. Run openswan service: "service ipsec start"
3. Run ausearch -m avc
  
Actual results:
There are avcs on the systems.

Expected results:
There should not be any avcs.

Additional info:

Comment 2 Milos Malik 2012-09-07 14:01:05 UTC
I believe that prelink should not occur on FIPS machines.

Comment 3 Miroslav Grepl 2012-09-11 07:02:35 UTC
Yes. You should uninstall the prelink on FIPS machines.

Comment 4 Steve Grubb 2012-09-11 11:05:17 UTC
Is SE Linux FIPS-140 aware? Should it know whether or not FIPS-140 is enabled and therefore block prelink? Otherwise, on a non-FIPS machine, you will get this.

Comment 5 Paul Wouters 2012-09-18 18:59:02 UTC
IMHO, at bootup when in fips mode, prelinking should be undone and the daily cron job extended to skip prelinking when in fips mode. Also, removing the prelink package should first run prelink -ua. (see related bugs)

Comment 14 Daniel Walsh 2012-09-20 00:21:53 UTC
So pluto and unix_chkpwd run or stat prelink when in fips_mode?  Is this real? Something caused by glibc?  Do I need to allow all domains to stat prelink?

Comment 15 Avesh Agarwal 2012-09-20 12:46:43 UTC
(In reply to comment #14)
> So pluto and unix_chkpwd run or stat prelink when in fips_mode?  Is this
> real? Something caused by glibc?  Do I need to allow all domains to stat
> prelink?

pluto does not touch prelink directly. pluto calls NSS API to initialize NSS database and that in turns stat prelink when NSS DB is in fips mode (irrespective of status of /proc/sys/crypto/fips_enabled). The bug https://bugzilla.redhat.com/show_bug.cgi?id=796423 seems to be have the same issue so it might be helpful.

I am not sure about what unix_chkpwd does with prelink. I noticed it when system is in fips mode (/proc/sys/crypto/fips_enabled set to 1) and I logged in using ssh.

Comment 16 Steve Grubb 2012-09-20 12:53:40 UTC
unix_chkpwd calls crypt in glibc. Glibc uses nss for crypto. So, its the same root cause. My guess is nss doesn't really need to be checking prelink. But the software is already shipped so we have to deal with it.

Comment 17 Daniel Walsh 2012-09-26 21:13:38 UTC
I have no problem allowing all domains to getattr on prelink_exec_t, if this is built into glibc.

Comment 18 Miroslav Grepl 2012-10-09 12:16:53 UTC
I added it.

Comment 22 errata-xmlrpc 2013-02-21 08:28:39 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.

http://rhn.redhat.com/errata/RHBA-2013-0314.html


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