Bug 1533380

Summary: SELinux is preventing snapd from 'search' accesses on the directory 6962.
Product: [Fedora] Fedora Reporter: Daniel Pettersen <db.mirandap>
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: artemio.silva, dwalsh, lvrabec, me, mgrepl, ngompa13, plautrba, pmoore, raul.robins, steffen, tony, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:357f42252e26c5689a57124f27a4d6a9e1f768b9796279769996a101dc639487;VARIANT_ID=workstation;
Fixed In Version: snapd-2.33.1-1.fc27 snapd-2.33.1-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
After digging into SELinux, it seems snapd is the main issue here. Using the software center triggers the snapd update service. As of now, I have not received the update for snapd policies in SELinux. I tried installing the updates manually, but it did not work.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-01 22:22:16 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 Daniel Pettersen 2018-01-11 08:37:39 UTC
Description of problem:
Installed TopIcons Plus (https://github.com/phocean/TopIcons-plus) when the system reported an error when the extension was enabled. 
SELinux is preventing snapd from 'search' accesses on the directory 6962.

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

If you believe that snapd should be allowed search access on the 6962 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 'snapd' --raw | audit2allow -M my-snapd
# semodule -X 300 -i my-snapd.pp

Additional Information:
Source Context                system_u:system_r:snappy_t:s0
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                6962 [ dir ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.17.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.8-300.fc27.x86_64 #1 SMP Wed
                              Dec 20 19:00:18 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2018-01-01 10:45:56 CET
Last Seen                     2018-01-01 10:45:56 CET
Local ID                      e932af5f-8845-4c15-87d2-0f3379aba756

Raw Audit Messages
type=AVC msg=audit(1514799956.602:379): avc:  denied  { search } for  pid=6968 comm="snapd" name="6962" dev="proc" ino=126173 scontext=system_u:system_r:snappy_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=dir permissive=1


Hash: snapd,snappy_t,unconfined_t,dir,search

Version-Release number of selected component:
selinux-policy-3.13.1-283.17.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.11-300.fc27.x86_64
type:           libreport

Comment 3 Steffen Scheib 2018-02-08 11:24:56 UTC
Description of problem:
Installed snapd (sudo dnf install snapd). During the installation process several SELinux denials are raised

Version-Release number of selected component:
selinux-policy-3.13.1-283.24.fc27.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.16-300.fc27.x86_64
type:           libreport

Comment 4 Artemio 2018-02-24 16:37:16 UTC
*** Bug 1548742 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2018-06-22 15:02:56 UTC
snapd-glib-1.41-1.fc28 snapd-2.33.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-942eec912c

Comment 6 Fedora Update System 2018-06-22 15:04:11 UTC
snapd-glib-1.41-1.fc27 snapd-2.33.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1330056acb

Comment 7 Fedora Update System 2018-06-23 18:55:30 UTC
snapd-2.33.1-1.fc27, snapd-glib-1.41-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1330056acb

Comment 8 Fedora Update System 2018-06-23 21:20:57 UTC
snapd-2.33.1-1.fc28, snapd-glib-1.41-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-942eec912c

Comment 9 Fedora Update System 2018-07-01 22:22:16 UTC
snapd-2.33.1-1.fc27, snapd-glib-1.41-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2018-07-01 22:35:14 UTC
snapd-2.33.1-1.fc28, snapd-glib-1.41-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.