Bug 2072243
| Summary: | SELinux is preventing pool-/usr/libex from 'rmdir' accesses on the directory 80. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michael <michael.scheiffler> |
| Component: | flatpak | Assignee: | Debarshi Ray <debarshir> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 36 | CC: | amigadave, debarshir, dwalsh, grepl.miroslav, klember, lvrabec, mail, mmalik, omosnace, pkoncity, vmojzis, zpytela |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | abrt_hash:a5bd7771effea5819a65b145d6ba9a66c80f54a4751c9a322b7af35dbde36a3e;VARIANT_ID=workstation; | ||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-07-08 17:12:52 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: | |||
| Bug Blocks: | 2075937 | ||
Needs to be resolved in flatpak-selinux. What would be the right interface to allow 'rmdir' inside /var/lib/flatpak? files_rmdir_all_dirs or files_manage_var_lib_dirs or files_rw_var_lib_dirs? flatpak should not be allowed to manage the whole /var/lib, so this is the time to confine /var/lib/flatpak. (In reply to Zdenek Pytela from comment #3) > flatpak should not be allowed to manage the whole /var/lib, so this is the > time to confine /var/lib/flatpak. Okay! What does "confine /var/lib/flatpak" really mean? I don't know enough about SELinux to understand that. Could you please give me some pointers? (In reply to Debarshi Ray from comment #4) > (In reply to Zdenek Pytela from comment #3) > > flatpak should not be allowed to manage the whole /var/lib, so this is the > > time to confine /var/lib/flatpak. > > Okay! What does "confine /var/lib/flatpak" really mean? I don't know > enough about SELinux to understand that. Could you please give me some > pointers? It means assign a new type to this directory, e. g. flatpak_var_lib_t, and allow flatpak_t manage this file type. Unfortunately it probably also means allow read access to additional domains accessing /var/lib/flatpak. (In reply to Zdenek Pytela from comment #5) > (In reply to Debarshi Ray from comment #4) > > (In reply to Zdenek Pytela from comment #3) > > > flatpak should not be allowed to manage the whole /var/lib, so this is the > > > time to confine /var/lib/flatpak. > > > > Okay! What does "confine /var/lib/flatpak" really mean? I don't know > > enough about SELinux to understand that. Could you please give me some > > pointers? > > It means assign a new type to this directory, e. g. flatpak_var_lib_t, and > allow flatpak_t manage this file type. Unfortunately it probably also means > allow read access to additional domains accessing /var/lib/flatpak. Okay! Thanks for clarifying that, Zdeněk. *** This bug has been marked as a duplicate of bug 2013407 *** |
Description of problem: SELinux is preventing pool-/usr/libex from 'rmdir' accesses on the directory 80. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that libex should be allowed rmdir access on the 80 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:var_lib_t:s0 Target Objects 80 [ 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 Permissive 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 1 First Seen 2022-04-05 23:44:40 CEST Last Seen 2022-04-05 23:44:40 CEST Local ID b2218539-6642-4871-8d03-39b68ecaf3b1 Raw Audit Messages type=AVC msg=audit(1649195080.952:717): avc: denied { rmdir } for pid=12473 comm="pool-/usr/libex" name="80" dev="nvme0n1p3" ino=5328800 scontext=system_u:system_r:flatpak_helper_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=1 Hash: pool-/usr/libex,flatpak_helper_t,var_lib_t,dir,rmdir 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