Bug 1862206

Summary: SELinux is preventing cups-pdf from 'connect' accesses on the unix_dgram_socket labeled cups_pdf_t.
Product: [Fedora] Fedora Reporter: James E. LaBarre <jlabarre>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: dwalsh, grepl.miroslav, lvrabec, mmalik, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b261a586d7463f1dc70b9c35e59121218d47b6e903f2b804d742aa43d317fbe7;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-11 15:38:13 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 James E. LaBarre 2020-07-30 17:54:55 UTC
Description of problem:
Installed cups-pdf through DNF package manager

Attempted to print to the cups-pdf device

Printout failed due to SElinux block.
SELinux is preventing cups-pdf from 'connect' accesses on the unix_dgram_socket labeled cups_pdf_t.

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

If you believe that cups-pdf should be allowed connect access on unix_dgram_socket labeled cups_pdf_t 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 'cups-pdf' --raw | audit2allow -M my-cupspdf
# semodule -X 300 -i my-cupspdf.pp

Additional Information:
Source Context                system_u:system_r:cups_pdf_t:s0-s0:c0.c1023
Target Context                system_u:system_r:cups_pdf_t:s0-s0:c0.c1023
Target Objects                Unknown [ unix_dgram_socket ]
Source                        cups-pdf
Source Path                   cups-pdf
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-42.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-42.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.7.8-200.fc32.x86_64 #1 SMP Thu
                              Jul 9 14:34:51 UTC 2020 x86_64 x86_64
Alert Count                   3
First Seen                    2020-06-24 13:42:46 EDT
Last Seen                     2020-07-30 13:47:48 EDT
Local ID                      94d2e910-816d-4924-b0f5-340aa09fa482

Raw Audit Messages
type=AVC msg=audit(1596131268.462:1393): avc:  denied  { connect } for  pid=350834 comm="cups-pdf" scontext=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 tclass=unix_dgram_socket permissive=0


Hash: cups-pdf,cups_pdf_t,cups_pdf_t,unix_dgram_socket,connect

(expectation is that this would be properly configured by the package manager)

Version-Release number of selected component:
selinux-policy-targeted-3.14.5-42.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.13.1
hashmarkername: setroubleshoot
kernel:         5.7.8-200.fc32.x86_64
type:           libreport

Comment 1 Milos Malik 2020-07-30 19:32:06 UTC
This SELinux denial is already mentioned in BZ#1832521 comment#2 and comment#4.

Comment 2 James E. LaBarre 2020-07-31 19:16:51 UTC
So it would seem the reporting tool in Fedora may not be thoroughly searching for similar reports.  At least I seem to remember it searching the existing BZ reports.

Comment 3 Zdenek Pytela 2020-08-11 15:38:13 UTC

*** This bug has been marked as a duplicate of bug 1832521 ***