Bug 1483635

Summary: cups_lpd: SELinux is preventing systemd from 'create' accesses on the tcp_socket port None.
Product: [Fedora] Fedora Reporter: Villy Kruse <ppywlkiqletw>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, lsm5, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:f680596475fced633dedd2c4c4709c05c4f100a4edae2ebdc4859736d157eae2;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-05 13:54:05 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 Villy Kruse 2017-08-21 14:17:58 UTC
Description of problem:
Exact duplicate of bug 1420522 (now closed)

How to reproduce:

systemctl start  cups-lpd.socket

Happens always.

The following socket operations are also denied:

accept bind create getattr ioctl listen setopt

Installing this selinux .te module fixes it for me:

module my_allow_cups_lpd 1.0;

require {
        type cupsd_lpd_t;
        type init_t;
        class tcp_socket { accept bind create getattr ioctl listen setopt };
}

#============= init_t ==============
allow init_t cupsd_lpd_t:tcp_socket { accept bind create getattr ioctl listen setopt };
SELinux is preventing systemd from 'create' accesses on the tcp_socket port None.

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

If you believe that systemd should be allowed create access on the port None tcp_socket 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 'systemd' --raw | audit2allow -M my-systemd
# semodule -X 300 -i my-systemd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                port None [ tcp_socket ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.4.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.12.5-300.fc26.i686+PAE #1 SMP
                              Mon Aug 7 15:58:11 UTC 2017 i686 i686
Alert Count                   1
First Seen                    2017-08-21 15:53:31 CEST
Last Seen                     2017-08-21 15:53:31 CEST
Local ID                      4327967e-f83e-4ba4-9415-91a0d319fee8

Raw Audit Messages
type=AVC msg=audit(1503323611.551:84): avc:  denied  { create } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=tcp_socket permissive=1


Hash: systemd,init_t,unconfined_service_t,tcp_socket,create

Version-Release number of selected component:
selinux-policy-3.13.1-260.4.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.i686+PAE
type:           libreport

Potential duplicate: bug 1399758

Comment 1 Lukas Vrabec 2018-01-05 13:54:05 UTC

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