Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1532015 - SELinux is preventing systemd from 'create' accesses on the tcp_socket port None (lpr)
Summary: SELinux is preventing systemd from 'create' accesses on the tcp_socket port N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:423be203d73fb63899e99d081f9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-07 12:42 UTC by Villy Kruse
Modified: 2018-03-20 18:16 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.28.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-20 18:16:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Villy Kruse 2018-01-07 12:42:39 UTC
Description of problem:
systemctl start cups-lpd.socket

systemd needs to be able to open and listen on the lpr socket (tcp port 515)

To fix, add this rule:

  allow init_t cupsd_lpd_t:tcp_socket { bind create 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:cupsd_lpd_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-283.21.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.14.11-300.fc27.i686+PAE #1 SMP
                              Wed Jan 3 14:14:43 UTC 2018 i686 i686
Alert Count                   2
First Seen                    2018-01-07 13:18:40 CET
Last Seen                     2018-01-07 13:35:08 CET
Local ID                      718681e6-e0da-4337-ba8a-f0960f53effe

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


Hash: systemd,init_t,cupsd_lpd_t,tcp_socket,create

Version-Release number of selected component:
selinux-policy-3.13.1-283.21.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.11-300.fc27.i686+PAE
type:           libreport

Comment 1 Fedora Update System 2018-03-07 17:10:40 UTC
selinux-policy-3.13.1-283.27.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 2 Fedora Update System 2018-03-08 16:21:26 UTC
selinux-policy-3.13.1-283.27.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 3 Villy Kruse 2018-03-10 04:15:36 UTC
Issue not fixed.


commit aa5973b6e2c3265bae9389dc413e4842725f18b0 allows socket activation via a unix socket.

Needed is socket activation via TCP socket port 515.

Comment 4 Villy Kruse 2018-03-10 04:18:31 UTC
Installed packages

selinux-policy.noarch                 3.13.1-283.27.fc27        @updates-testing
selinux-policy-devel.noarch           3.13.1-283.27.fc27        @updates-testing
selinux-policy-doc.noarch             3.13.1-283.27.fc27        @updates-testing
selinux-policy-targeted.noarch        3.13.1-283.27.fc27        @updates-testing

Selinux issues

type=AVC msg=audit(1520654159.008:218): avc:  denied  { create } for  pid=1 comm="systemd" scontext=s
ystem_u:system_r:init_t:s0 tcontext=system_u:system_r:cupsd_lpd_t:s0 tclass=tcp_socket permissive=1
type=AVC msg=audit(1520654159.008:219): avc:  denied  { setopt } for  pid=1 comm="systemd" scontext=s
ystem_u:system_r:init_t:s0 tcontext=system_u:system_r:cupsd_lpd_t:s0 tclass=tcp_socket permissive=1
type=AVC msg=audit(1520654159.008:220): avc:  denied  { bind } for  pid=1 comm="systemd" scontext=sys
tem_u:system_r:init_t:s0 tcontext=system_u:system_r:cupsd_lpd_t:s0 tclass=tcp_socket permissive=1
type=AVC msg=audit(1520654159.009:221): avc:  denied  { listen } for  pid=1 comm="systemd" lport=515
scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:cupsd_lpd_t:s0 tclass=tcp_socket perm
issive=1

Comment 5 Fedora Update System 2018-03-12 18:17:08 UTC
selinux-policy-3.13.1-283.28.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 6 Fedora Update System 2018-03-14 01:34:35 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 7 Villy Kruse 2018-03-14 04:59:53 UTC
Issue not fixed.

No change between selinux-policy-3.13.1-283.27.fc27 and selinux-policy-3.13.1-283.28.fc27.

Comment 8 Fedora Update System 2018-03-20 18:16:04 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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