Bug 1915531
| Summary: | [OVS IPsec] Permission denied: '/etc/ipsec.conf' with SELinux is Enforcing - RHEL7 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux Fast Datapath | Reporter: | Aaron Conole <aconole> | ||||||||
| Component: | openvswitch-selinux-extra-policy | Assignee: | Aaron Conole <aconole> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | Jean-Tsung Hsiao <jhsiao> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | FDP 20.I | CC: | aconole, ctrautma, jhsiao, jishi, pvauter, qding, ralongi, tredaelli, yinxu | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | 1906278 | Environment: | |||||||||
| Last Closed: | 2022-10-24 15:10:06 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | 1906278 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Aaron Conole
2021-01-12 20:15:29 UTC
Created attachment 1750510 [details]
audit log for self-signed certificate mode
Created attachment 1750511 [details]
audit log for CA-signed certificate mode
openvswitch-selinux-extra-policy-1.0-17.el7fdp.noarch has problem. Please see the attachments in comment#5 and #c6. [root@dell-per730-04 ~]# rpm -qa | grep selinux libselinux-utils-2.5-15.el7.x86_64 selinux-policy-3.13.1-268.el7_9.2.noarch libselinux-2.5-15.el7.x86_64 openvswitch-selinux-extra-policy-1.0-17.el7fdp.noarch selinux-policy-targeted-3.13.1-268.el7_9.2.noarch libselinux-python-2.5-15.el7.x86_64 [root@dell-per730-04 ~]# Created attachment 1750776 [details]
audit log for CA-signed mode with openvswitch-selinux-extra-policy-1.0-18
With openvswitch-selinux-extra-policy-1.0-18.el7fdp.noarch and selinux is Permissive, it works well, but when selinux is Enforcing it doesn't. Please check the log audit_ca_18.log. Thanks.
09:34:04 aconole@dhcp-25 /tmp/mozilla_aconole0$ grep openvswitch_t audit_ca_18.log | grep AVC
09:34:13 aconole@dhcp-25 /tmp/mozilla_aconole0$ grep type=AVC audit_ca_18.log
type=AVC msg=audit(1611644458.555:240): avc: denied { create } for pid=12055 comm="certutil" name="dbTemp.M7HhrG" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644458.577:241): avc: denied { rmdir } for pid=12055 comm="certutil" name="dbTemp.M7HhrG" dev="dm-0" ino=67875735 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644458.701:242): avc: denied { execute } for pid=12049 comm="ipsec" name="setfiles" dev="dm-0" ino=34064518 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1611644458.701:243): avc: denied { read } for pid=12049 comm="ipsec" name="setfiles" dev="dm-0" ino=34064518 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1611644458.701:244): avc: denied { open } for pid=12057 comm="ipsec" path="/usr/sbin/setfiles" dev="dm-0" ino=34064518 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1611644458.701:244): avc: denied { execute_no_trans } for pid=12057 comm="ipsec" path="/usr/sbin/setfiles" dev="dm-0" ino=34064518 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1611644458.702:245): avc: denied { getattr } for pid=12057 comm="restorecon" name="/" dev="sysfs" ino=1 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem permissive=1
type=AVC msg=audit(1611644458.702:246): avc: denied { getattr } for pid=12057 comm="restorecon" name="/" dev="devtmpfs" ino=2049 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=filesystem permissive=1
type=AVC msg=audit(1611644458.703:247): avc: denied { getattr } for pid=12057 comm="restorecon" name="/" dev="tmpfs" ino=14343 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem permissive=1
type=AVC msg=audit(1611644458.703:248): avc: denied { getattr } for pid=12057 comm="restorecon" name="/" dev="cgroup" ino=14348 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=filesystem permissive=1
type=AVC msg=audit(1611644458.703:249): avc: denied { getattr } for pid=12057 comm="restorecon" name="/" dev="hugetlbfs" ino=29717 scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:hugetlbfs_t:s0 tclass=filesystem permissive=1
type=AVC msg=audit(1611644458.764:250): avc: denied { create } for pid=12072 comm="pluto" name="dbTemp.kfNgLU" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644458.785:251): avc: denied { rmdir } for pid=12072 comm="pluto" name="dbTemp.kfNgLU" dev="dm-0" ino=34317304 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644464.410:269): avc: denied { create } for pid=12586 comm="pluto" name="dbTemp.SbC3nI" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644464.431:270): avc: denied { rmdir } for pid=12586 comm="pluto" name="dbTemp.SbC3nI" dev="dm-0" ino=126526 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644535.264:317): avc: denied { create } for pid=24983 comm="pluto" name="dbTemp.BOvQbs" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644535.285:318): avc: denied { rmdir } for pid=24983 comm="pluto" name="dbTemp.BOvQbs" dev="dm-0" ino=101163476 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644535.818:329): avc: denied { create } for pid=25364 comm="pluto" name="dbTemp.OAvDc7" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1611644535.840:330): avc: denied { rmdir } for pid=25364 comm="pluto" name="dbTemp.OAvDc7" dev="dm-0" ino=67875735 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=1
I see lots of problems for ipsec_t domain - but we don't control that.
Is it really intended to work on RHEL7?
Both "systemctl start openvswitch-ipsec" and "systemctl restart openvswitch-ipsec" were executed successfully:
[root@netqe7 ipsec]# !25
systemctl start openvswitch-ipsec
[root@netqe7 ipsec]# !28
systemctl restart openvswitch-ipsec
[root@netqe7 ipsec]# rpm -qa | grep openvswitch
openvswitch2.13-2.13.0-95.el7fdp.x86_64
openvswitch2.13-ipsec-2.13.0-95.el7fdp.x86_64
python3-openvswitch2.13-2.13.0-95.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-18.el7fdp.noarch
[root@netqe7 ipsec]#
But, there were AVC encountered:
tail -f /var/log/audit/audit.log | grep AVC
type=AVC msg=audit(1621911533.663:266): avc: denied { create } for pid=16084 comm="pluto" name="dbTemp.zX89oM" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1621911547.116:278): avc: denied { create } for pid=16481 comm="pluto" name="dbTemp.BluZvX" scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:ipsec_key_file_t:s0 tclass=dir permissive=0
Hi Aaron, Can we closed this one ? Thanks! Jean |