Bug 2097881

Summary: SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.
Product: [Fedora] Fedora Reporter: cwkeller+redhat
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: go-sig, maciek.borzecki, me, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:579e8c21d2891f8a4ad88a70f205ed2bf8efb7b82582379a07dc95278b282f68;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-25 17:52:56 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 cwkeller+redhat 2022-06-16 20:02:02 UTC
Description of problem:
SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that snap-update-ns should have the dac_override capability 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-update-ns' --raw | audit2allow -M my-snapupdatens
# semodule -X 300 -i my-snapupdatens.pp

Additional Information:
Source Context                system_u:system_r:snappy_mount_t:s0
Target Context                system_u:system_r:snappy_mount_t:s0
Target Objects                Unknown [ capability ]
Source                        snap-update-ns
Source Path                   snap-update-ns
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.10-1.fc36.noarch
Local Policy RPM              snapd-selinux-2.55.3-1.fc36.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.17.11-300.fc36.x86_64 #1 SMP
                              PREEMPT Wed May 25 15:04:05 UTC 2022 x86_64 x86_64
Alert Count                   1
First Seen                    2022-06-07 12:07:52 MDT
Last Seen                     2022-06-07 12:07:52 MDT
Local ID                      21ba000e-15e6-4085-a958-35f61d006977

Raw Audit Messages
type=AVC msg=audit(1654625272.597:3738): avc:  denied  { dac_override } for  pid=189261 comm="snap-update-ns" capability=1  scontext=system_u:system_r:snappy_mount_t:s0 tcontext=system_u:system_r:snappy_mount_t:s0 tclass=capability permissive=1


Hash: snap-update-ns,snappy_mount_t,snappy_mount_t,capability,dac_override

Version-Release number of selected component:
selinux-policy-targeted-36.10-1.fc36.noarch

Additional info:
component:      snapd
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.17.14-300.fc36.x86_64
type:           libreport

Comment 1 b.gatessucks 2022-10-01 10:56:04 UTC
Similar problem has been detected:

Booted
Logged in

hashmarkername: setroubleshoot
kernel:         5.19.12-200.fc36.x86_64
package:        selinux-policy-targeted-36.15-1.fc36.noarch
reason:         SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.
type:           libreport

Comment 2 Ben Cotton 2023-04-25 17:26:46 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Ludek Smid 2023-05-25 17:52:56 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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