Bug 1022660 - Confined SELinux users are not able to see user logs using journald
Confined SELinux users are not able to see user logs using journald
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 14:08 EDT by Thorsten Scherf
Modified: 2015-06-29 08:42 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-29 08:42:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thorsten Scherf 2013-10-23 14:08:15 EDT
Description of problem:
Confined SELinux users are not able to view user logs, while unconfined users can view the logs:

$ journalctl 
Hint: You are currently not seeing messages from other users and the system.
      Users in the groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
$ id -Z
staff_u:staff_r:staff_t:s0

vs.
$ journalctl 
-- Logs begin at Thu 2013-10-10 22:02:54 CEST, end at Wed 2013-10-23 19:59:56 CEST. --
Oct 10 22:02:54 fedora.virt.tuxgeek.de systemd[1011]: Failed to open private bus connection: Failed to connect to socket /run/user/1000
Oct 10 22:02:54 fedora.virt.tuxgeek.de systemd[1011]: Mounted /sys/kernel/config.
Oct 10 22:02:54 fedora.virt.tuxgeek.de systemd[1011]: Startup finished in 26ms.
Oct 10 22:02:54 fedora.virt.tuxgeek.de systemd[1011]: Starting Default.
Oct 10 22:02:54 fedora.virt.tuxgeek.de systemd[1011]: Reached target Default.

$ id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023


Version-Release number of selected component (if applicable):
systemd-208-2.fc20.x86_64

How reproducible:
Login as staff_u user 
run journalctl

Steps to Reproduce:
1.
2.
3.

Actual results:
see above

Expected results:
able to see user logs

Additional info:
Comment 1 Thorsten Scherf 2013-10-23 16:28:03 EDT
this needs to be reported against selinux-policy of course. changed that. policy version test against is selinux-policy-targeted-3.12.1-75.fc20.noarch.
Comment 2 Miroslav Grepl 2013-10-24 10:01:38 EDT
Any chance to update to the latest policy and re-test it and attach AVC msgs if it does not work. Thank you.
Comment 3 Thorsten Scherf 2013-11-01 08:06:23 EDT
# rpm -q selinux-policy-targeted
selinux-policy-targeted-3.12.1-90.fc20.noarch

# ausearch -m AVC -ts today
----
time->Fri Nov  1 13:03:53 2013
type=SYSCALL msg=audit(1383307433.583:961): arch=c000003e syscall=2 success=yes exit=5 a0=7f423fca0420 a1=80000 a2=0 a3=72756f6a2e303030 items=0 ppid=10041 pid=10065 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=30 tty=pts0 comm="journalctl" exe="/usr/bin/journalctl" subj=staff_u:staff_r:staff_t:s0 key=(null)
type=AVC msg=audit(1383307433.583:961): avc:  denied  { open } for  pid=10065 comm="journalctl" path="/var/log/journal/dba94626aa526841cf8d6fd7101caf64/user-1000.journal" dev="dm-1" ino=265053 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
type=AVC msg=audit(1383307433.583:961): avc:  denied  { read } for  pid=10065 comm="journalctl" name="user-1000.journal" dev="dm-1" ino=265053 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
Comment 4 Daniel Walsh 2013-11-04 11:13:51 EST
It would seem this would be best handled via a transition on execution of journalctl.  So the only way these logs would be viewable would be with journalctl.

We don't want to allow a loose permissioned log file to be read by a confined user.
Comment 5 Daniel Walsh 2013-11-04 11:29:02 EST
a689b59da27ef127338fe9342a926220c9f8d4b9
and

e4f229150289137efe78d644daf2fcf8a4b331ec

Adds journalctl policy to git.
Comment 6 Fedora End Of Life 2015-05-29 05:37:15 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Fedora End Of Life 2015-06-29 08:42:02 EDT
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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