Description of problem: Trying to use IPSEC (strongswan) VPN connection via Gnome UI, with certificates stored at ~/.pki or ~/.cert My investigation so far is below. My conclusions might be wrong as of my limited selinux knowledge. Storing certificates at ~/.pki or ~/.cert works for OpenVPN. OpenVPN arranges that probably via userdom_read_home_certs(openvpn_t) which seems to grant home_cert_t to openvpn_t. We might need the same for ipsec_t, i.e.: userdom_read_home_certs(ipsec_t) as charon-nm runs as ipsec_t: sudo ps -efZ | grep charon-nm system_u:system_r:ipsec_t:s0 root 5968 1 0 12:08 ? 00:00:00 /usr/libexec/strongswan/charon-nm SELinux is preventing charon-nm from 'map' accesses on the file /home/mirek/.pki/goodboyKey.der. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that charon-nm should be allowed map access on the goodboyKey.der file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'charon-nm' --raw | audit2allow -M my-charonnm # semodule -X 300 -i my-charonnm.pp Additional Information: Source Context system_u:system_r:ipsec_t:s0 Target Context unconfined_u:object_r:home_cert_t:s0 Target Objects /home/mirek/.pki/goodboyKey.der [ file ] Source charon-nm Source Path charon-nm Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-283.17.fc27.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.14.2-300.fc27.x86_64 #1 SMP Mon Nov 27 16:50:24 UTC 2017 x86_64 x86_64 Alert Count 12 First Seen 2017-12-01 12:08:23 CET Last Seen 2017-12-01 12:37:59 CET Local ID 2bc5dbd4-a342-4b5e-b111-0e506d38f026 Raw Audit Messages type=AVC msg=audit(1512128279.544:524): avc: denied { map } for pid=5968 comm="charon-nm" path="/home/mirek/.pki/goodboyKey.der" dev="sda1" ino=538683507 scontext=system_u:system_r:ipsec_t:s0 tcontext=unconfined_u:object_r:home_cert_t:s0 tclass=file permissive=0 Hash: charon-nm,ipsec_t,home_cert_t,file,map Version-Release number of selected component: selinux-policy-3.13.1-283.17.fc27.noarch Additional info: component: selinux-policy reporter: libreport-2.9.3 hashmarkername: setroubleshoot kernel: 4.14.2-300.fc27.x86_64 type: libreport
selinux-policy-3.13.1-283.18.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502
selinux-policy-3.13.1-283.18.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502
Description of problem: Using NetworkManager, trying to establish IPSEC VPN connection with certificates (CA, user) and key (user) stored at ~/.pki Version-Release number of selected component: selinux-policy-3.13.1-283.18.fc27.noarch Additional info: reporter: libreport-2.9.3 hashmarkername: setroubleshoot kernel: 4.14.5-300.fc27.x86_64 type: libreport
Fixed in f27 and higher: https://github.com/fedora-selinux/selinux-policy/commit/2a20e5c421ddbef18704901c4c5ef4d83435e957
selinux-policy-3.13.1-283.19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.