Bug 1540741 - SELinux is preventing snap-discard-ns from read, write access on the file spotify.lock.
Summary: SELinux is preventing snap-discard-ns from read, write access on the file spo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:045b549474811061a431a4cfa51...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-31 22:23 UTC by Marco S
Modified: 2018-07-01 22:34 UTC (History)
7 users (show)

Fixed In Version: snapd-2.33.1-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-01 22:34:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marco S 2018-01-31 22:23:01 UTC
Description of problem:
On Fedora 27, after the last software update of yesterday, Spotify (under snapd) stopped working. 
When I start spotify from the terminal, I receive this error: cannot create tmpfs target /tmp/snap.rootfs_Gc6HQN/var/lib/snapd/lib/vulkan: No such file or directory
I tried to snap remove spotify , and then snap install spotify. When the install runs, a lot of SElinux errors are thrown, including the one of this bug report.
This was not happening with the previous version of snapd.
SELinux is preventing snap-discard-ns from read, write access on the file spotify.lock.

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

If you believe that snap-discard-ns should be allowed read write access on the spotify.lock file 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 'snap-discard-ns' --raw | audit2allow -M my-snapdiscardns
# semodule -X 300 -i my-snapdiscardns.pp

Additional Information:
Source Context                system_u:system_r:snappy_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                spotify.lock [ file ]
Source                        snap-discard-ns
Source Path                   snap-discard-ns
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.21.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.14.14-300.fc27.x86_64 #1 SMP Fri
                              Jan 19 13:19:54 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-01-31 23:05:17 CET
Last Seen                     2018-01-31 23:05:17 CET
Local ID                      576f2c68-f09b-428d-91c4-a2de490f611a

Raw Audit Messages
type=AVC msg=audit(1517436317.34:425): avc:  denied  { read write } for  pid=21768 comm="snap-discard-ns" name="spotify.lock" dev="tmpfs" ino=126399 scontext=system_u:system_r:snappy_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file permissive=1


Hash: snap-discard-ns,snappy_t,var_run_t,file,read,write

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

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

Comment 1 Fedora Update System 2018-06-22 15:02:24 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 2 Fedora Update System 2018-06-23 21:20:41 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 3 Fedora Update System 2018-07-01 22:34:59 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.


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