Bug 2043161 - SELinux is preventing snap-confine from 'getattr' accesses on the chr_file /dev/kvm.
Summary: SELinux is preventing snap-confine from 'getattr' accesses on the chr_file /d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 35
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6d64ef0ada256c78a79de8c9740...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-20 18:11 UTC by Davide Repetto
Modified: 2022-02-20 01:08 UTC (History)
4 users (show)

Fixed In Version: snapd-2.54.3-1.fc37 snapd-2.54.3-1.fc36 snapd-2.54.3-1.fc34 snapd-2.54.3-1.fc35
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-17 18:27:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Davide Repetto 2022-01-20 18:11:47 UTC
Description of problem:
SELinux is preventing snap-confine from 'getattr' accesses on the chr_file /dev/kvm.

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

Se ci credi snap-confine dovrebbe essere consentito getattr accesso al kvm chr_file per impostazione predefinita.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
consentire questo accesso per ora eseguendo:
# ausearch -c 'snap-confine' --raw | audit2allow -M my-$MODULE_NOME
# semodule -X 300 -i miei-snapconfine.pp

Additional Information:
Source Context                system_u:system_r:snappy_confine_t:s0
Target Context                system_u:object_r:kvm_device_t:s0
Target Objects                /dev/kvm [ chr_file ]
Source                        snap-confine
Source Path                   snap-confine
Port                          <Sconosciuto>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.11-1.fc35.noarch
Local Policy RPM              snapd-selinux-2.54.1-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
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                   1
First Seen                    2022-01-20 19:08:58 CET
Last Seen                     2022-01-20 19:08:58 CET
Local ID                      a4ce48aa-52f8-4e1a-ae26-0b405bc55fd5

Raw Audit Messages
type=AVC msg=audit(1642702138.381:225): avc:  denied  { getattr } for  pid=1317 comm="snap-confine" path="/dev/kvm" dev="devtmpfs" ino=600 scontext=system_u:system_r:snappy_confine_t:s0 tcontext=system_u:object_r:kvm_device_t:s0 tclass=chr_file permissive=1


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

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

Additional info:
component:      snapd
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:23:49 UTC
FEDORA-2022-9d711dbc98 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9d711dbc98

Comment 2 Fedora Update System 2022-02-17 18:25:04 UTC
FEDORA-2022-59c701f3ef has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-59c701f3ef

Comment 3 Fedora Update System 2022-02-17 18:27:37 UTC
FEDORA-2022-9d711dbc98 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2022-02-17 18:28:08 UTC
FEDORA-2022-59c701f3ef has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

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

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

Comment 7 Fedora Update System 2022-02-18 01:17:14 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 8 Fedora Update System 2022-02-18 02:11:21 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 9 Fedora Update System 2022-02-20 00:41:18 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 10 Fedora Update System 2022-02-20 01:08:58 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.


Note You need to log in before you can comment on or make changes to this bug.