Bug 1536366

Summary: SELinux is preventing snapd from 'create' accesses on the file sections.F8S3X422g8L4.
Product: [Fedora] Fedora Reporter: tinkert
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, martin.gieseking, me, mgrepl, ngompa13, plautrba, pmoore, steffen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5af2ada89be06b06e2c71e35c35f7703d9722b2886cdbd567285e7a82a86261a;
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:22:04 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 tinkert 2018-01-19 09:02:40 UTC
Description of problem:
On restart.
SELinux is preventing snapd from 'create' accesses on the file sections.F8S3X422g8L4.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow snapd to have create access on the sections.F8S3X422g8L4 file
Then you need to change the label on sections.F8S3X422g8L4
Do
# semanage fcontext -a -t FILE_TYPE 'sections.F8S3X422g8L4'
where FILE_TYPE is one of the following: dbusd_etc_t, snappy_home_t, snappy_var_lib_t, snappy_var_run_t, snappy_var_t, systemd_unit_file_t, tmp_t, udev_rules_t.
Then execute:
restorecon -v 'sections.F8S3X422g8L4'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that snapd should be allowed create access on the sections.F8S3X422g8L4 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                sections.F8S3X422g8L4 [ file ]
Source                        snapd
Source Path                   snapd
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                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.13-300.fc27.x86_64 #1 SMP Thu
                              Jan 11 04:00:01 UTC 2018 x86_64 x86_64
Alert Count                   3
First Seen                    2018-01-17 17:23:31 PST
Last Seen                     2018-01-19 00:54:37 PST
Local ID                      858033dc-6a75-464a-917c-b3b5947d4e8f

Raw Audit Messages
type=AVC msg=audit(1516352077.377:254): avc:  denied  { create } for  pid=2579 comm="snapd" name="sections.F8S3X422g8L4" 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,create

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.13-300.fc27.x86_64
type:           libreport

Comment 1 Steffen Scheib 2018-02-08 11:04:49 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 2 Fedora Update System 2018-06-22 15:02:33 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 3 Fedora Update System 2018-06-22 15:03:59 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 4 Fedora Update System 2018-06-23 18:55:19 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 5 Fedora Update System 2018-06-23 21:20:46 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 6 Fedora Update System 2018-07-01 22:22: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 7 Fedora Update System 2018-07-01 22:35:04 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.