Bug 2043895

Summary: SELinux is preventing snap-confine from 'getattr' accesses on the chr_file /dev/uhid.
Product: [Fedora] Fedora Reporter: aannoaanno
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: dwalsh, go-sig, grepl.miroslav, lvrabec, maciek.borzecki, me, mmalik, ngompa13, omosnace, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3cf5c498b8ab3465a62976221e89d76f95200f12b93ca9541e02f4498490121b;VARIANT_ID=workstation;
Fixed In Version: snapd-2.54.3-1.fc34 snapd-2.54.3-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-20 00:41:23 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-01-22 11:54:43 UTC
Description of problem:
SELinux is preventing snap-confine from 'getattr' accesses on the chr_file /dev/uhid.

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

Wenn Sie denken, dass es snap-confine standardmäßig erlaubt sein sollte, getattr Zugriff auf uhid chr_file 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 'snap-confine' --raw | audit2allow -M my-snapconfine
# semodule -X 300 -i my-snapconfine.pp

Additional Information:
Source Context                system_u:system_r:snappy_confine_t:s0
Target Context                system_u:object_r:uhid_device_t:s0
Target Objects                /dev/uhid [ chr_file ]
Source                        snap-confine
Source Path                   snap-confine
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.11-1.fc35.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.15.15-200.fc35.x86_64 #1 SMP Sun
                              Jan 16 17:37:06 UTC 2022 x86_64 x86_64
Alert Count                   18
First Seen                    2022-01-08 16:26:02 CET
Last Seen                     2022-01-22 12:48:09 CET
Local ID                      8d41bbbd-6e2b-471c-b148-6f5c11655ea0

Raw Audit Messages
type=AVC msg=audit(1642852089.41:232): avc:  denied  { getattr } for  pid=2549 comm="snap-confine" path="/dev/uhid" dev="devtmpfs" ino=210 scontext=system_u:system_r:snappy_confine_t:s0 tcontext=system_u:object_r:uhid_device_t:s0 tclass=chr_file permissive=1


Hash: snap-confine,snappy_confine_t,uhid_device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-targeted-35.11-1.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.15.2
hashmarkername: setroubleshoot
kernel:         5.15.15-200.fc35.x86_64
type:           libreport

Comment 1 Fedora Update System 2022-02-17 18:36:22 UTC
FEDORA-2022-82bea71e5a has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-82bea71e5a

Comment 2 Fedora Update System 2022-02-17 18:36:54 UTC
FEDORA-2022-5df8b52ba4 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5df8b52ba4

Comment 3 Fedora Update System 2022-02-18 01:17:19 UTC
FEDORA-2022-82bea71e5a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-82bea71e5a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-82bea71e5a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2022-02-18 02:11:25 UTC
FEDORA-2022-5df8b52ba4 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5df8b52ba4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5df8b52ba4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-02-20 00:41:23 UTC
FEDORA-2022-82bea71e5a has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-02-20 01:09:04 UTC
FEDORA-2022-5df8b52ba4 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.