Bug 822789 - avc denial on systemd-journald prevents startup when /etc/machine-id doesn't exist
avc denial on systemd-journald prevents startup when /etc/machine-id doesn't ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-18 03:16 EDT by vt
Modified: 2012-06-03 19:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-03 19:30:27 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 vt 2012-05-18 03:16:52 EDT
Description of problem:
If the /etc/machine-id file doesn't exist, systemd installs a temporary machine-id file which is bind-mounted to /run/systemd/machine-id. Because of this, it has the wrong context (system_u:object_r:init_var_run_t:s0 instead of system_u:object_r:etc_runtime_t:s0), which prevents systemd-journald from starting.

Version-Release number of selected component (if applicable):
3.10.0-125.fc17

How reproducible:
Always, when systemd is enforcing

Steps to Reproduce:
1. Remove /etc/machine-id
2. Reboot

Actual results:
Machine starts up normally.

Expected results:
systemd enters emergency mode because of systemd-journal failure.

Additional info:

type=PATH msg=audit(1337324051.472:101): item=0 name="/etc/machine-id" inode=410 dev=00:10 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:init_var_run_t:s0
type=CWD msg=audit(1337324051.472:101):  cwd="/"
type=SYSCALL msg=audit(1337324051.472:101): arch=40000003 syscall=5 success=yes exit=8 a0=8064600 a1=88100 a2=0 a3=bfe28944 items=1 ppid=1 pid=854 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-journal" exe="/usr/lib/systemd/systemd-journald" subj=system_u:system_r:syslogd_t:s0 key=(null)
type=AVC msg=audit(1337324051.472:101): avc:  denied  { open } for  pid=854 comm="systemd-journal" dev="tmpfs" ino=410 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file
type=AVC msg=audit(1337324051.472:101): avc:  denied  { read } for  pid=854 comm="systemd-journal" dev="tmpfs" ino=410 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file
Comment 1 Daniel Walsh 2012-05-18 13:36:25 EDT
Fixed in selinux-policy-3.10.0-126.fc17
Comment 2 Fedora Update System 2012-05-31 02:25:15 EDT
selinux-policy-3.10.0-128.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-128.fc17
Comment 3 Fedora Update System 2012-06-01 13:07:50 EDT
Package selinux-policy-3.10.0-128.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-128.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8720/selinux-policy-3.10.0-128.fc17
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-06-03 19:30:27 EDT
selinux-policy-3.10.0-128.fc17 has been pushed to the Fedora 17 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.