Description of problem: After configuring SSSD to use smart cards for local login, it fails to use softhsm pkcs11 module (automatically loaded from p11-kit). SELinux is preventing p11_child from 'search' accesses on the directory .config. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that p11_child should be allowed search access on the .config directory 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 'p11_child' --raw | audit2allow -M my-p11child # semodule -X 300 -i my-p11child.pp Additional Information: Source Context system_u:system_r:sssd_t:s0 Target Context unconfined_u:object_r:config_home_t:s0 Target Objects .config [ dir ] Source p11_child Source Path p11_child Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.3-41.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.1.16-300.fc30.x86_64 #1 SMP Wed Jul 3 15:06:51 UTC 2019 x86_64 x86_64 Alert Count 501 First Seen 2019-07-03 11:01:28 CEST Last Seen 2019-07-24 10:24:21 CEST Local ID fa8b4829-7934-412b-9890-eb092e566d51 Raw Audit Messages type=AVC msg=audit(1563956661.406:1469): avc: denied { search } for pid=15332 comm="p11_child" name=".config" dev="dm-1" ino=2754153 scontext=system_u:system_r:sssd_t:s0 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir permissive=0 Hash: p11_child,sssd_t,config_home_t,dir,search Version-Release number of selected component: selinux-policy-3.14.3-41.fc30.noarch Additional info: component: selinux-policy reporter: libreport-2.10.1 hashmarkername: setroubleshoot kernel: 5.1.16-300.fc30.x86_64 type: libreport
There is one more alert with every login, since the softhsm also tries to search system path: SELinux is preventing p11_child from search access on the directory /var/lib/softhsm. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that p11_child should be allowed search access on the softhsm directory 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 'p11_child' --raw | audit2allow -M my-p11child # semodule -X 300 -i my-p11child.pp Additional Information: Source Context system_u:system_r:sssd_t:s0 Target Context system_u:object_r:named_cache_t:s0 Target Objects /var/lib/softhsm [ dir ] Source p11_child Source Path p11_child Port <Unknown> Host t470s.jjelen.redhat.com Source RPM Packages Target RPM Packages softhsm-2.5.0-3.fc30.1.x86_64 Policy RPM selinux-policy-3.14.3-41.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name t470s.jjelen.redhat.com Platform Linux t470s.jjelen.redhat.com 5.1.16-300.fc30.x86_64 #1 SMP Wed Jul 3 15:06:51 UTC 2019 x86_64 x86_64 Alert Count 501 First Seen 2019-07-03 11:01:28 CEST Last Seen 2019-07-24 10:24:21 CEST Local ID 0cacfb2f-f3dc-455b-ab9e-b8b05647213b Raw Audit Messages type=AVC msg=audit(1563956661.406:1470): avc: denied { search } for pid=15332 comm="p11_child" name="softhsm" dev="dm-1" ino=791764 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:named_cache_t:s0 tclass=dir permissive=0 Hash: p11_child,sssd_t,named_cache_t,dir,search
commit a5bd00d73ce3a011650a38465aeb0091d0faf178 (HEAD -> rawhide) Author: Lukas Vrabec <lvrabec> Date: Wed Jul 24 22:10:10 2019 +0200 Allow sssd_t domain to read gnome config and named cache files After configuring SSSD to use smart cards for local login, it fails to use softhsm pkcs11 module (automatically loaded from p11-kit). This commit fixes the issue
FEDORA-2019-8c534abad8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8c534abad8
selinux-policy-3.14.3-42.fc30 has been pushed to the Fedora 30 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-2019-8c534abad8
selinux-policy-3.14.3-42.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
I guess I should have submitted all the AVCs generated in permissive, since after the above update, one more pops up. Can you add also this one? After switching to permissive, I am not getting any more issues (I don't have any softhsm tokens systemwide), but generally, I think everything under /var/lib/softhsm should have separate label, which should be accessible by sssd in this case. Can you have a look also into this issue? Attaching the AVC I am getting (the tokens is a directory under /var/lib/softhsm): type=AVC msg=audit(1564503006.772:721): avc: denied { read } for pid=15226 comm="p11_child" name="tokens" dev="dm-1" ino=791776 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:named_cache_t:s0 tclass=dir permissive=0
commit 990dba1c4b6cf8d605bd1aa0e5ded481c585e0e7 (HEAD -> rawhide, origin/rawhide, origin/HEAD) Author: Lukas Vrabec <lvrabec> Date: Thu Aug 1 10:36:43 2019 +0200 Update bind_read_cache() interface to allow caller domain also list named_cache_t dirs. Resolves: rhbz#1732723
FEDORA-2019-be14ea0375 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-be14ea0375
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 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-2019-be14ea0375
selinux-policy-3.14.3-45.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.