Bug 2231563 - SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.
Summary: SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:579e8c21d2891f8a4ad88a70f20...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-11 22:37 UTC by bmhj
Modified: 2023-08-11 22:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.44 KB, text/plain)
2023-08-11 22:37 UTC, bmhj
no flags Details
File: os_info (734 bytes, text/plain)
2023-08-11 22:37 UTC, bmhj
no flags Details

Description bmhj 2023-08-11 22:37:54 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-38.17-1.fc38.noarch
Local Policy RPM              snapd-selinux-2.58.3-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.3.8-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Jun 15 02:15:40 UTC 2023
                              x86_64
Alert Count                   3
First Seen                    2023-06-26 11:31:07 BST
Last Seen                     2023-06-26 11:31:24 BST
Local ID                      05797000-91d9-40ab-bb46-7452d1009829

Raw Audit Messages
type=AVC msg=audit(1687775484.711:720): avc:  denied  { dac_override } for  pid=21537 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-38.17-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
reason:         SELinux is preventing snap-update-ns from using the 'dac_override' capabilities.
package:        selinux-policy-targeted-38.17-1.fc38.noarch
component:      snapd
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.4.7-200.fc38.x86_64
component:      snapd



Potential duplicate: bug 2097881

Comment 1 bmhj 2023-08-11 22:37:57 UTC
Created attachment 1983081 [details]
File: description

Comment 2 bmhj 2023-08-11 22:37:59 UTC
Created attachment 1983082 [details]
File: os_info


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