Description of problem: flatpak update SELinux is preventing pool-/usr/libex from 'read' accesses on the directory userdb. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that libex should be allowed read access on the userdb 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 'pool-/usr/libex' --raw | audit2allow -M my-poolusrlibex # semodule -X 300 -i my-poolusrlibex.pp Additional Information: Source Context system_u:system_r:flatpak_helper_t:s0 Target Context system_u:object_r:systemd_userdbd_runtime_t:s0 Target Objects userdb [ dir ] Source pool-/usr/libex Source Path pool-/usr/libex Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-36.5-1.fc36.noarch Local Policy RPM flatpak-selinux-1.12.7-1.fc36.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.16.16-200.fc35.x86_64 #1 SMP PREEMPT Wed Mar 23 00:44:58 CET 2022 x86_64 x86_64 Alert Count 2 First Seen 2022-03-31 23:25:57 CEST Last Seen 2022-04-02 10:38:50 CEST Local ID 4a3dc918-6e0b-4b44-99e6-e8abe562982b Raw Audit Messages type=AVC msg=audit(1648888730.61:418): avc: denied { read } for pid=4980 comm="pool-/usr/libex" name="userdb" dev="tmpfs" ino=36 scontext=system_u:system_r:flatpak_helper_t:s0 tcontext=system_u:object_r:systemd_userdbd_runtime_t:s0 tclass=dir permissive=0 Hash: pool-/usr/libex,flatpak_helper_t,systemd_userdbd_runtime_t,dir,read Version-Release number of selected component: selinux-policy-targeted-36.5-1.fc36.noarch Additional info: component: flatpak reporter: libreport-2.17.1 hashmarkername: setroubleshoot kernel: 5.16.16-200.fc35.x86_64 type: libreport
Is this somehow related to https://github.com/fedora-selinux/selinux-policy/pull/540 ?
Needs to be resolved in flatpak-selinux.
What will be the right SELinux interface to solve this? I looked at selinux-policy/policy/modules/system/systemd.if but it wasn't immediately clear which one I should use.
I took another look, and systemd_userdbd_stream_connect() seems to be the interface that's needed. Does this look good to you: https://github.com/flatpak/flatpak/pull/4892
(In reply to Debarshi Ray from comment #4) > I took another look, and systemd_userdbd_stream_connect() seems to be the > interface that's needed. Does this look good to you: > https://github.com/flatpak/flatpak/pull/4892 ping
Problem still persists on my f36 installation
(In reply to Debarshi Ray from comment #4) > I took another look, and systemd_userdbd_stream_connect() seems to be the > interface that's needed. Does this look good to you: > https://github.com/flatpak/flatpak/pull/4892 That's the right interface. Alternatively, assigning to nsswitch_domain attribute could be an option if flatpak needs access to all nss methods.
(In reply to aannoaanno from comment #6) > Problem still persists on my f36 installation Yes, that's because we never got this fixed in Fedora. That's why the bug is still open. :)
FEDORA-2022-cbfe9e2744 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cbfe9e2744
FEDORA-2022-cbfe9e2744 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-cbfe9e2744` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-cbfe9e2744 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-cbfe9e2744 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.