Bug 1403463 - SELinux AVCs for logwatch with systemd journalctl support
Summary: SELinux AVCs for logwatch with systemd journalctl support
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-10 14:25 UTC by Anthony Messina
Modified: 2018-02-06 15:31 UTC (History)
11 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-02-06 15:31:38 UTC


Attachments (Terms of Use)
Logwath selinux policy for journalctl (258 bytes, text/plain)
2017-04-29 12:51 UTC, Nicholas Kudriavtsev
no flags Details
Logwath selinux policy for journalctl (404 bytes, text/plain)
2017-04-30 08:55 UTC, Nicholas Kudriavtsev
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 864872 None NEW RFE: Logwatch parse Journal 2018-10-30 21:09 UTC

Description Anthony Messina 2016-12-10 14:25:26 UTC
After upgrading to logwatch-7.4.3-3.fc25.noarch with support for parsing journald logs, the following AVCs are generated, effectively disabling the recent addition of journald support to logwatch.  See bug #864872.

AVC avc:  denied  { execute } for  pid=19919 comm="perl" name="journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute } for  pid=19919 comm="perl" name="journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { read open } for  pid=31910 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { read open } for  pid=31910 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute_no_trans } for  pid=10444 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute_no_trans } for  pid=10444 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute_no_trans } for  pid=27384 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute_no_trans } for  pid=27384 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787811 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=0
AVC avc:  denied  { execute_no_trans } for  pid=19018 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787808 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=1
AVC avc:  denied  { sys_resource } for  pid=19018 comm="journalctl" capability=24  scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=capability permissive=1
AVC avc:  denied  { setrlimit } for  pid=19018 comm="journalctl" scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=process permissive=1
AVC avc:  denied  { execute_no_trans } for  pid=22896 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787808 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=1
AVC avc:  denied  { sys_resource } for  pid=22896 comm="journalctl" capability=24  scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=capability permissive=1
AVC avc:  denied  { setrlimit } for  pid=22896 comm="journalctl" scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=process permissive=1
AVC avc:  denied  { execute_no_trans } for  pid=23638 comm="perl" path="/usr/bin/journalctl" dev="md1" ino=57787808 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=1
AVC avc:  denied  { sys_resource } for  pid=23638 comm="journalctl" capability=24  scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=capability permissive=1
AVC avc:  denied  { setrlimit } for  pid=23638 comm="journalctl" scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tclass=process permissive=1

Comment 1 Nicholas Kudriavtsev 2017-04-29 12:50:21 UTC
The same errors with Fedora 26 except "setrlimit" denial. Seems "sys_resource" denial does not prevent to run joutnalctl and get results. The local policy to resolve the denials is attached.

Comment 2 Nicholas Kudriavtsev 2017-04-29 12:51 UTC
Created attachment 1275144 [details]
Logwath selinux policy for journalctl

Comment 3 Nicholas Kudriavtsev 2017-04-30 08:55 UTC
Created attachment 1275268 [details]
Logwath selinux policy for journalctl

Well, I also have setrlimit denial. Here it is the updated policy.

Comment 4 Anthony Messina 2017-12-17 16:51:16 UTC
In F27, journalctl in the logwatch_t context needs map access to journalctl_exec_t and var_log_t

AVC avc:  denied  { map } for  pid=14565 comm="journalctl" path="/usr/bin/journalctl" dev="md1" ino=57788544 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:journalctl_exec_t:s0 tclass=file permissive=1
AVC avc:  denied  { map } for  pid=14565 comm="journalctl" path="/var/log/journal/d23491c98ce8481cb7262477c211ea9f/user-1136600007@79d3f5b5266844acb649704b7ccd89c4-0000000002386779-00055cf6268ed381.journal" dev="md1" ino=109004652 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=1

Comment 5 Fedora Update System 2018-01-30 16:41:31 UTC
selinux-policy-3.13.1-283.24.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a144eca5a8

Comment 6 Fedora Update System 2018-01-31 22:45:05 UTC
selinux-policy-3.13.1-283.24.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-a144eca5a8

Comment 7 Fedora Update System 2018-02-06 15:31:38 UTC
selinux-policy-3.13.1-283.24.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.