Bug 1243010

Summary: systemd loading IMA policy
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Aster <jaster>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Jaroslav Aster <jaster>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: jscotka, lnykryn, msekleta, pasik, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1226948 Environment:
Last Closed: 2015-11-19 15:07:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jaroslav Aster 2015-07-14 14:42:53 UTC
Hi,

I found the same issue on rhel-7.2 beta. I was not able to boot my notebook, the last message, I saw, was

[!!!!!!] Failed to load IMA policy, freezing

Workaround was to remove /etc/ima directory.

systemd-219-5.el7.x86_64

+++ This bug was initially created as a clone of Bug #1226948 +++

The original systemd IMA module loaded the IMA policy by mmaping the
file into memory and then writing the entire file to
<securityfs>/ima/policy.  By changing this behavior of writing the
entire file,  commit 4dfb18922d5d "ima-setup: simplify"  broke IMA
policy loading.

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

Fedora 22: systemd src/core/ima-setup.c

How reproducible:

Always

Steps to Reproduce:
1. On boot with an IMA policy in /etc/ima/ima-policy (default location)

Actual results:

systemd[1]: Failed to load the IMA custom policy file /etc/ima/ima-policy: Invalid argument
IMA: policy updated failed
[!!!!!!] Failed to load IMA policy, freezing

Expected results:
systemd[1]: Successfully loaded the IMA custom policy /etc/ima/ima-policy
kernel: IMA: policy update completed

Additional info:
Please revert commit 4dfb18922d5d1efb13ee459cbf23832277f85ed7 and the
related hunk in commit 7430ec6ac08f2c0416d9f806964c46b30f3862b2.

This bug was reported by Patrick Ohly.

--- Additional comment from  on 2015-06-02 08:08:12 EDT ---


"[PATCH] Partially revert "ma-setup: simplify" by Zbigniew Jędrzejewski-Szmek http://lists.freedesktop.org/archives/systemd-devel/2015-June/032632.html fixes the regression.

Please pick up the patch.

--- Additional comment from Zbigniew Jędrzejewski-Szmek on 2015-06-12 23:54:06 EDT ---

https://github.com/systemd/systemd/pull/167 merged.

--- Additional comment from Fedora Update System on 2015-07-07 22:35:48 EDT ---

systemd-219-19.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/systemd-219-19.fc22

--- Additional comment from Fedora Update System on 2015-07-10 15:18:02 EDT ---

Package systemd-219-19.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-219-19.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11332/systemd-219-19.fc22
then log in and leave karma (feedback).

Comment 4 errata-xmlrpc 2015-11-19 15:07:42 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://rhn.redhat.com/errata/RHBA-2015-2092.html