Bug 2229899

Summary: SELinux is preventing 5 from 'getattr' accesses on the file /var/snap/cups/common/etc/papersize.
Product: [Fedora] Fedora Reporter: Atticus Finch <fatticus301>
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: fatticus301, go-sig, maciek.borzecki, me, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:89b9664ea03a5b7aab21dceba983b2693c4307868e58de6662d0913767dade5c;VARIANT_ID=kde;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: description
none
File: os_info none

Description Atticus Finch 2023-08-08 07:00:34 UTC
Description of problem:
SELinux is preventing 5 from 'getattr' accesses on the file /var/snap/cups/common/etc/papersize.

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

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

Additional Information:
Source Context                system_u:system_r:snappy_mount_t:s0
Target Context                system_u:object_r:snappy_var_t:s0
Target Objects                /var/snap/cups/common/etc/papersize [ file ]
Source                        5
Source Path                   5
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.22-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.4.7-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Jul 27 20:01:18 UTC 2023
                              x86_64
Alert Count                   52
First Seen                    2023-07-17 03:00:06 +03
Last Seen                     2023-08-08 09:47:18 +03
Local ID                      76aacb30-470c-4398-8696-c8180f9bce87

Raw Audit Messages
type=AVC msg=audit(1691477238.714:173): avc:  denied  { getattr } for  pid=1013 comm="5" path="/var/snap/cups/common/etc/papersize" dev="nvme0n1p3" ino=497961 scontext=system_u:system_r:snappy_mount_t:s0 tcontext=system_u:object_r:snappy_var_t:s0 tclass=file permissive=1


Hash: 5,snappy_mount_t,snappy_var_t,file,getattr

Version-Release number of selected component:
selinux-policy-targeted-38.22-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
reason:         SELinux is preventing 5 from 'getattr' accesses on the file /var/snap/cups/common/etc/papersize.
package:        selinux-policy-targeted-38.22-1.fc38.noarch
component:      snapd
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.4.7-200.fc38.x86_64
component:      snapd

Comment 1 Atticus Finch 2023-08-08 07:00:37 UTC
Created attachment 1982237 [details]
File: description

Comment 2 Atticus Finch 2023-08-08 07:00:38 UTC
Created attachment 1982238 [details]
File: os_info