Bug 1580125 - SELinux is preventing snapd from 'map' accesses on the file /var/cache/snapd/commands.db.
Summary: SELinux is preventing snapd from 'map' accesses on the file /var/cache/snapd/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:479c048d3d1e3c269243cd77712...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-20 12:36 UTC by Knut J BJuland
Modified: 2018-07-25 07:11 UTC (History)
9 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:
Environment:
Last Closed: 2018-07-01 22:21:50 UTC
Type: ---


Attachments (Terms of Use)

Description Knut J BJuland 2018-05-20 12:36:26 UTC
Description of problem:
snap install spotify
SELinux is preventing snapd from 'map' accesses on the file /var/cache/snapd/commands.db.

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

If you believe that snapd should be allowed map access on the commands.db 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 '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/commands.db [ file ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-24.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.8-300.fc28.x86_64 #1 SMP Wed
                              May 9 20:23:40 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-05-20 14:35:03 CEST
Last Seen                     2018-05-20 14:35:03 CEST
Local ID                      7cc55229-b1b6-4447-8d05-951686440d78

Raw Audit Messages
type=AVC msg=audit(1526819703.295:573): avc:  denied  { map } for  pid=24159 comm="snapd" path="/var/cache/snapd/commands.db" dev="sdc4" ino=2229988 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,map

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

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

Potential duplicate: bug 1567933

Comment 1 Fedora Update System 2018-06-23 22:31:29 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 2 Fedora Update System 2018-06-23 22:31:49 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-07-01 22:21:50 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:31 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 sudip chatterjee 2018-07-25 07:11:49 UTC
Description of problem:
Installing span packages caused this exception. But no problem in daily usage.

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.6-200.fc28.x86_64
type:           libreport


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