Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1509453 - SELinux is preventing gcp-cups-connec from write access on the sock_file cups.sock.
Summary: SELinux is preventing gcp-cups-connec from write access on the sock_file cups...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-03 19:40 UTC by Rick Richardson
Modified: 2017-11-06 09:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-06 09:07:18 UTC


Attachments (Terms of Use)

Description Rick Richardson 2017-11-03 19:40:08 UTC
$ sealert -l 3f1446c7-ea1f-4434-a3fb-78f5109109ed
SELinux is preventing gcp-cups-connec from write access on the sock_file cups.sock.

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

If you believe that gcp-cups-connec should be allowed write access on the cups.sock sock_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 'gcp-cups-connec' --raw | audit2allow -M my-gcpcupsconnec
# semodule -X 300 -i my-gcpcupsconnec.pp


Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:cupsd_var_run_t:s0
Target Objects                cups.sock [ sock_file ]
Source                        gcp-cups-connec
Source Path                   gcp-cups-connec
Port                          <Unknown>
Host                          quad.rkkda.org
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.23.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     quad.rkkda.org
Platform                      Linux quad.rkkda.org 4.13.10-100.fc25.x86_64 #1
                              SMP Fri Oct 27 17:05:04 UTC 2017 x86_64 x86_64
Alert Count                   114041
First Seen                    2016-12-19 12:43:41 CST
Last Seen                     2017-11-03 14:35:16 CDT
Local ID                      3f1446c7-ea1f-4434-a3fb-78f5109109ed

Raw Audit Messages
type=AVC msg=audit(1509737716.703:386): avc:  denied  { write } for  pid=1620 comm="gcp-cups-connec" name="cups.sock" dev="tmpfs" ino=22878 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:cupsd_var_run_t:s0 tclass=sock_file permissive=1


Hash: gcp-cups-connec,init_t,cupsd_var_run_t,sock_file,write


From:

$ root cat /var/log/messages

Nov  3 14:34:20 quad setroubleshoot[4639]: SELinux is preventing gcp-cups-connec from write access on the sock_file cups.sock. For complete SELinux messages run: sealert -l 3f1446c7-ea1f-4434-a3fb-78f5109109ed
Nov  3 14:34:20 quad python3[4639]: SELinux is preventing gcp-cups-connec from write access on the sock_file cups.sock.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that gcp-cups-connec should be allowed write access on the cups.sock sock_file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'gcp-cups-connec' --raw | audit2allow -M my-gcpcupsconnec#012# semodule -X 300 -i my-gcpcupsconnec.pp#012
Nov  3 14:34:23 quad setroubleshoot[4639]: failed to retrieve rpm info for /run/cups/cups.sock
Nov  3 14:34:23 quad setroubleshoot[4639]: SELinux is preventing gcp-cups-connec from connectto access on the unix_stream_socket /run/cups/cups.sock. For complete SELinux messages run: sealert -l e70610f0-19a0-4771-a597-1611c7b3846c
Nov  3 14:34:23 quad python3[4639]: SELinux is preventing gcp-cups-connec from connectto access on the unix_stream_socket /run/cups/cups.sock.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that gcp-cups-connec should be allowed connectto access on the cups.sock unix_stream_socket by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'gcp-cups-connec' --raw | audit2allow -M my-gcpcupsconnec#012# semodule -X 300 -i my-gcpcupsconnec.pp#012

Comment 1 Zdenek Dohnal 2017-11-06 09:07:18 UTC
Hi,

First, we do not support packages, which aren't in Fedora official repos. From what I get it gcp-cups-connec is Cloud print connector, which isn't in official repos.
Second, gcp-cups-connector is trying to connect to /run/cups/cups.sock, but CUPS is listening on /var/run/cups/cups.sock. App should connect to other one. Closing as NOTABUG.


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