Bug 2144260

Summary: SELinux is preventing waydroid from 'search' accesses on the Verzeichnis /var/lib/snapd.
Product: [Fedora] Fedora Reporter: aannoaanno
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: ales.astone, dwalsh, grepl.miroslav, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3f381e192e46d2ddd4dd0c58b57a24c6d84bc189d01842815c863a73db34e6f3;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-03 13:23:39 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:

Description aannoaanno 2022-11-20 10:11:06 UTC
Description of problem:
SELinux is preventing waydroid from 'search' accesses on the Verzeichnis /var/lib/snapd.

*****  Plugin catchall (100. confidence) suggests   **************************

Wenn Sie denken, dass es waydroid standardmäßig erlaubt sein sollte, search Zugriff auf snapd directory zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# ausearch -c 'waydroid' --raw | audit2allow -M my-waydroid
# semodule -X 300 -i my-waydroid.pp

Additional Information:
Source Context                system_u:system_r:waydroid_t:s0
Target Context                system_u:object_r:snappy_var_lib_t:s0
Target Objects                /var/lib/snapd [ dir ]
Source                        waydroid
Source Path                   waydroid
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           snapd-2.56.2-5.fc37.x86_64
SELinux Policy RPM            selinux-policy-targeted-37.14-1.fc37.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.0.8-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Nov 11 15:09:04 UTC 2022
                              x86_64 x86_64
Alert Count                   2
First Seen                    2022-11-19 11:38:35 CET
Last Seen                     2022-11-20 11:09:44 CET
Local ID                      79753dc4-2fac-4052-8c86-e9e4a119c53f

Raw Audit Messages
type=AVC msg=audit(1668938984.463:232): avc:  denied  { search } for  pid=1969 comm="waydroid" name="snapd" dev="dm-1" ino=3092727 scontext=system_u:system_r:waydroid_t:s0 tcontext=system_u:object_r:snappy_var_lib_t:s0 tclass=dir permissive=0


Hash: waydroid,waydroid_t,snappy_var_lib_t,dir,search

Version-Release number of selected component:
selinux-policy-targeted-37.14-1.fc37.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         6.0.8-300.fc37.x86_64
type:           libreport

Potential duplicate: bug 2134044

Comment 1 aannoaanno 2022-12-24 09:24:06 UTC
Similar problem has been detected:

Happens every time after system reboot.

hashmarkername: setroubleshoot
kernel:         6.0.14-300.fc37.x86_64
package:        selinux-policy-targeted-37.16-1.fc37.noarch
reason:         SELinux is preventing waydroid from 'search' accesses on the Verzeichnis /var/lib/snapd.
type:           libreport

Comment 2 Alessandro Astone 2023-01-03 13:23:39 UTC

*** This bug has been marked as a duplicate of bug 2134044 ***