Bug 1574368

Summary: SELinux is preventing snapd from 'read' accesses on the directory snap.
Product: [Fedora] Fedora Reporter: Giacomo F.M. <elmejodegiacomo>
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: alexander.janssen, dwalsh, lucas.overton, lvrabec, madridabogadosmx, me, mgrepl, ngompa13, noobusinghacks, plautrba, pmoore, quiquearauz20
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6bd20c36aab6cf206a6bc2aca345bd83f141e7a59a36835595fe8219c180a010;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:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-01 22:23:18 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 Giacomo F.M. 2018-05-03 07:15:01 UTC
Description of problem:
SELinux is preventing snapd from 'read' accesses on the directory snap.

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

If you believe that snapd should be allowed read access on the snap 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:object_r:user_home_t:s0
Target Objects                snap [ dir ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-21.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.5-300.fc28.x86_64 #1 SMP Fri
                              Apr 27 17:38:36 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-05-03 09:03:17 CEST
Last Seen                     2018-05-03 09:03:17 CEST
Local ID                      da15c85e-9ba9-4bc3-8535-11fe18fc74d1

Raw Audit Messages
type=AVC msg=audit(1525330997.845:292): avc:  denied  { read } for  pid=2541 comm="snapd" name="snap" dev="dm-3" ino=1058155 scontext=system_u:system_r:snappy_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1


Hash: snapd,snappy_t,user_home_t,dir,read

Version-Release number of selected component:
selinux-policy-3.14.1-21.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.5-300.fc28.x86_64
type:           libreport

Potential duplicate: bug 1564672

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

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

Comment 3 Fedora Update System 2018-07-01 22:23:18 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 4 Fedora Update System 2018-07-01 22:36:12 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.

Comment 5 Alexander W. Janssen 2018-07-28 07:49:40 UTC
Description of problem:
Every time snap is involved, I get bombarded with SELinux denial alerts.
Manually setting up a plethora of new policies simply doesn't help, a general solution is needed!
I'm now gonna bugsubmit the hell out of this.

Version-Release number of selected component:
selinux-policy-3.14.1-32.fc28.noarch

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.17.7-200.fc28.x86_64
type:           libreport

Comment 6 Javier Arauz 2018-08-15 00:28:34 UTC
Description of problem:
It seems that the problem was caused for using Snap.

Version-Release number of selected component:
selinux-policy-3.14.1-37.fc28.noarch

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.17.12-200.fc28.x86_64
type:           libreport