Bug 854671
| Summary: | selinux avcs when running openswan on a system with fips enabled | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Avesh Agarwal <avagarwa> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2 | CC: | dwalsh, ebenes, mmalik, omoris, pwouters, sgrubb |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.7.19-168.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 08:28:39 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: | |||
I believe that prelink should not occur on FIPS machines. Yes. You should uninstall the prelink on FIPS machines. 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. 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) 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? (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. 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. I have no problem allowing all domains to getattr on prelink_exec_t, if this is built into glibc. I added it. 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 |
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: