Bug 1658861

Summary: SELinux is preventing snap from 'remove_name' accesses on the directory 3664.
Product: [Fedora] Fedora Reporter: Alick Zhao <alick9188>
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, go-sig, lvrabec, me, ngompa13, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:d33c91206db37e8bb66a6c5fc943c65e14a8554933fcac75e42ec34fef83c4f4;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-29 00:09:15 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 Alick Zhao 2018-12-13 03:27:25 UTC
Description of problem:
1. sudo snap install --classic heroku

Directories like /root/snap/heroku/3664 appear.

2. sudo snap remove heroku

Some remaining directories are empty but not purged per se.
SELinux is preventing snap from 'remove_name' accesses on the directory 3664.

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

If you believe that snap should be allowed remove_name access on the 3664 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 'snap' --raw | audit2allow -M my-snap
# semodule -X 300 -i my-snap.pp

Additional Information:
Source Context                system_u:system_r:snappy_t:s0
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                3664 [ dir ]
Source                        snap
Source Path                   snap
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-48.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.19.6-200.fc28.x86_64 #1 SMP Sun
                              Dec 2 18:03:32 UTC 2018 x86_64 x86_64
Alert Count                   6
First Seen                    2018-11-12 10:39:22 CST
Last Seen                     2018-12-11 22:38:45 CST
Local ID                      f1368a6b-ae5b-4b02-b9e0-9537e16e4b5c

Raw Audit Messages
type=AVC msg=audit(1544589525.883:419): avc:  denied  { remove_name } for  pid=8410 comm="snapd" name="3664" dev="dm-0" ino=656448 scontext=system_u:system_r:snappy_t:s0 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir permissive=1


Hash: snap,snappy_t,admin_home_t,dir,remove_name

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

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

Comment 1 Ben Cotton 2019-05-02 19:23:43 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-05-29 00:09:15 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.