Bug 1592028 - SELinux is preventing systemd-journal from map access on the file /var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/system.journal
Summary: SELinux is preventing systemd-journal from map access on the file /var/log/jo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
high
urgent
Target Milestone: beta
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-16 10:17 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:06 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-209.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:05:46 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:06:45 UTC

Description Lukas Slebodnik 2018-06-16 10:17:12 UTC
SELinux is preventing systemd-journal from map access on the file /var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/system.journal.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/system.journal default label should be var_log_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/system.journal

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that systemd-journal should be allowed map access on the system.journal 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 'systemd-journal' --raw | audit2allow -M my-systemdjournal
# semodule -i my-systemdjournal.pp


Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:object_r:container_log_t:s0
Target Objects                /var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/
                              system.journal [ file ]
Source                        systemd-journal
Source Path                   systemd-journal
Port                          <Unknown>
Host                          host.example.com
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-204.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     host.example.com
Platform                      Linux host.example.com
                              3.10.0-905.el7.x86_64 #1 SMP Wed Jun 13 13:48:50
                              EDT 2018 x86_64 x86_64
Alert Count                   22347
First Seen                    2018-06-16 04:55:47 EDT
Last Seen                     2018-06-16 05:04:48 EDT
Local ID                      cd72b6f5-889e-42a0-b7a1-f0b47be0810c

Raw Audit Messages
type=AVC msg=audit(1529139888.617:22956): avc:  denied  { map } for  pid=908 comm="systemd-journal" path="/var/log/journal/72f5bc79a4d24f1d9ce24f2748849a79/system.journal" dev="dm-0" ino=68133542 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:container_log_t:s0 tclass=file permissive=0


Hash: systemd-journal,syslogd_t,container_log_t,file,map

Comment 3 Qian Cai 2018-07-25 13:23:08 UTC
Saw loads of those on aarch64 machines.

allow syslogd_t container_log_t:file map;

Comment 4 Qian Cai 2018-07-25 13:45:17 UTC
Probably need one of those similar patches,

https://github.com/fedora-selinux/selinux-policy/pull/208

# rpm -qa | grep selinux
selinux-policy-targeted-3.13.1-207.el7.noarch
selinux-policy-3.13.1-207.el7.noarch
libselinux-utils-2.5-13.el7.aarch64
libselinux-2.5-13.el7.aarch64
libselinux-python-2.5-13.el7.aarch64
container-selinux-2.68-1.el7.noarch

Comment 5 Lokesh Mandvekar 2018-07-27 17:18:32 UTC
Dan, could you PTAL at this?

Comment 6 Daniel Walsh 2018-07-29 11:55:38 UTC
Lukas this seems more like an selinux-policy issue.

syslogd_t should be able to map all files with the logfile attribute.

Do you agree?

Comment 7 Lukas Vrabec 2018-07-29 13:58:22 UTC
Make sense to me. Fixed in fedora also will create patches for RHEL.

Comment 11 errata-xmlrpc 2018-10-30 10:05:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3111


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