Bug 1543373 - SELinux is preventing snapd from 'getattr' accesses on the file /var/cache/snapd/sections.
Summary: SELinux is preventing snapd from 'getattr' accesses on the file /var/cache/sn...
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 27
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:a34ef1289831a0bfb59e01f049e...
: 1544548 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-02-08 10:59 UTC by Steffen Scheib
Modified: 2018-07-01 22:35 UTC (History)
8 users (show)

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:
Clone Of:
Last Closed: 2018-07-01 22:23:04 UTC
Type: ---

Attachments (Terms of Use)

Description Steffen Scheib 2018-02-08 10:59:06 UTC
Description of problem:
Installed snapd (sudo dnf install snapd). During the installation process several SELinux denials are raised
SELinux is preventing snapd from 'getattr' accesses on the file /var/cache/snapd/sections.

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

If you believe that snapd should be allowed getattr access on the sections file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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                system_u:object_r:var_t:s0
Target Objects                /var/cache/snapd/sections [ file ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.24.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.16-300.fc27.x86_64 #1 SMP Wed
                              Jan 31 19:24:27 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-02-08 11:33:20 CET
Last Seen                     2018-02-08 11:33:20 CET
Local ID                      f8d57404-671e-461a-a1a4-a95ec448ddf7

Raw Audit Messages
type=AVC msg=audit(1518086000.979:855): avc:  denied  { getattr } for  pid=16556 comm="snapd" path="/var/cache/snapd/sections" dev="dm-1" ino=1311353 scontext=system_u:system_r:snappy_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=file permissive=1

Hash: snapd,snappy_t,var_t,file,getattr

Version-Release number of selected component:

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

Comment 1 Jeremy 2018-02-12 20:29:30 UTC
*** Bug 1544548 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2018-06-23 22:23:28 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 3 Fedora Update System 2018-06-23 22:24:24 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 4 Fedora Update System 2018-07-01 22:23:04 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 5 Fedora Update System 2018-07-01 22:35: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.