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 1513403 - start of syslog-ng is blocked by SELinux
Summary: start of syslog-ng is blocked by SELinux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-15 11:00 UTC by Peter Czanik
Modified: 2017-11-28 23:52 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.17.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 23:52:57 UTC


Attachments (Terms of Use)

Description Peter Czanik 2017-11-15 11:00:16 UTC
Description of problem:

Start of syslog-ng is blocked by SELinux. 

Version-Release number of selected component (if applicable):

Fedora 27 as of November 15 with all updates
[root@localhost ~]# rpm -qa | grep syslog
syslog-ng-3.10.1-3.fc27.x86_64
[root@localhost ~]# rpm -qa | grep selinux
selinux-policy-targeted-3.13.1-283.14.fc27.noarch
selinux-policy-3.13.1-283.14.fc27.noarch
rpm-plugin-selinux-4.14.0-2.fc27.x86_64
libselinux-python3-2.7-2.fc27.x86_64
libselinux-2.7-2.fc27.x86_64
libselinux-utils-2.7-2.fc27.x86_64


How reproducible:

Always.

Steps to Reproduce:
1. "systemctl start syslog-ng" on a freshly installed system
2.
3.

Actual results:

syslog-ng does not start. Journal shows the following information:

"
Nov 15 11:14:58 localhost.localdomain systemd[1]: Starting System Logger Daemon...
Nov 15 11:14:58 localhost.localdomain audit[3815]: AVC avc:  denied  { map } for  pid=3815 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=664080 scontext=system_u:system_r:syslogd_t
Nov 15 11:14:58 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=syslog-ng comm="systemd" exe="/usr/lib/systemd/systemd" hostnam
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 15 11:14:58 localhost.localdomain systemd[1]: Failed to start System Logger Daemon.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Unit entered failed state.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Failed with result 'exit-code'.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Service hold-off time over, scheduling restart.
Nov 15 11:14:58 localhost.localdomain systemd[1]: Stopped System Logger Daemon.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Start request repeated too quickly.
Nov 15 11:14:58 localhost.localdomain systemd[1]: Failed to start System Logger Daemon.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Unit entered failed state.
Nov 15 11:14:58 localhost.localdomain systemd[1]: syslog-ng.service: Failed with result 'exit-code'.
Nov 15 11:14:58 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=syslog-ng comm="systemd" exe="/usr/lib/systemd/systemd" hostnam
Nov 15 11:14:58 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=syslog-ng comm="systemd" exe="/usr/lib/systemd/systemd" hostname
Nov 15 11:15:01 localhost.localdomain dbus-daemon[722]: [system] Activating service name='org.fedoraproject.Setroubleshootd' requested by ':1.139' (uid=0 pid=698 comm="/usr/sbin/sedispatch " label="system_u:syst
Nov 15 11:15:02 localhost.localdomain dbus-daemon[722]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Nov 15 11:15:02 localhost.localdomain setroubleshoot[3817]: failed to retrieve rpm info for /var/lib/syslog-ng/syslog-ng.persist-
Nov 15 11:15:02 localhost.localdomain setroubleshoot[3817]: SELinux is preventing syslog-ng from map access on the file /var/lib/syslog-ng/syslog-ng.persist-. For complete SELinux messages run: sealert -l 0e7634
Nov 15 11:15:02 localhost.localdomain python3[3817]: SELinux is preventing syslog-ng from map access on the file /var/lib/syslog-ng/syslog-ng.persist-.
                                                     
                                                     *****  Plugin catchall (100. confidence) suggests   **************************
                                                     
                                                     If you believe that syslog-ng should be allowed map access on the syslog-ng.persist- 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 'syslog-ng' --raw | audit2allow -M my-syslogng
                                                     # semodule -X 300 -i my-syslogng.pp

"

Expected results:

starting syslog-ng without any errors

Additional info:

syslog-ng.persist and syslog-ng.persist- are used by syslog-ng to store some information between restarts, for example file or journal reading positions, etc.

Comment 1 Lukas Vrabec 2017-11-16 12:43:17 UTC
Hi, 

Could you try to reproduce the scenario and attach output of: 

# ausearch -m AVC -ts recent 

Thanks,
Lukas.

Comment 2 Peter Czanik 2017-11-17 08:18:05 UTC
Did a fresh install and ran the above command:

[root@localhost ~]# ausearch -m AVC -ts recent 
----
time->Fri Nov 17 09:15:38 2017
type=AVC msg=audit(1510906538.911:313): avc:  denied  { map } for  pid=3487 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=273636 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_var_lib_t:s0 tclass=file permissive=0
----
time->Fri Nov 17 09:15:39 2017
type=AVC msg=audit(1510906539.176:317): avc:  denied  { map } for  pid=3488 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=273636 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_var_lib_t:s0 tclass=file permissive=0
----
time->Fri Nov 17 09:15:39 2017
type=AVC msg=audit(1510906539.425:321): avc:  denied  { map } for  pid=3489 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=273636 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_var_lib_t:s0 tclass=file permissive=0
----
time->Fri Nov 17 09:15:39 2017
type=AVC msg=audit(1510906539.675:325): avc:  denied  { map } for  pid=3490 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=273636 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_var_lib_t:s0 tclass=file permissive=0
----
time->Fri Nov 17 09:15:39 2017
type=AVC msg=audit(1510906539.924:329): avc:  denied  { map } for  pid=3491 comm="syslog-ng" path="/var/lib/syslog-ng/syslog-ng.persist-" dev="dm-0" ino=273636 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_var_lib_t:s0 tclass=file permissive=0

Comment 3 Fedora Update System 2017-11-22 08:53:48 UTC
selinux-policy-3.13.1-283.17.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d05b1a2ab9

Comment 4 Fedora Update System 2017-11-22 21:40:35 UTC
selinux-policy-3.13.1-283.17.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-2017-d05b1a2ab9

Comment 5 Fedora Update System 2017-11-28 23:52:57 UTC
selinux-policy-3.13.1-283.17.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.