Bug 1264510 - SELinux is preventing auditd from { read append } access to /var/log/audit/audit.log
SELinux is preventing auditd from { read append } access to /var/log/audit/au...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
22
All Unspecified
high Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-18 12:04 EDT by Christian Stadelmann
Modified: 2015-11-10 03:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-10 03:11:27 EST
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 Christian Stadelmann 2015-09-18 12:04:19 EDT
Description of problem:
Since I updated selinux-policy-targeted from 3.13.1-128.12 to 3.13.1-128.13 three days ago, auditd stopped working.

$ systemctl status auditd.service
● auditd.service - Security Auditing Service
   Loaded: loaded (/usr/lib/systemd/system/auditd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fr 2015-09-18 hh:mm:54 CEST; 1h 41min ago
 Main PID: 826 (code=exited, status=6)

Sep 18 hh:mm:53 hostnamesystemd[1]: Starting Security Auditing Service...
Sep 18 hh:mm:53 hostnameauditctl[827]: No rules
Sep 18 hh:mm:53 hostnamesystemd[1]: Started Security Auditing Service.
Sep 18 hh:mm:54 hostnamesystemd[1]: auditd.service: main process exited, code=exited, status=6/NOTCONFIGURED
Sep 18 hh:mm:54 hostnamesystemd[1]: Unit auditd.service entered failed state.
Sep 18 hh:mm:54 hostnamesystemd[1]: auditd.service failed.

sealert is unable to display any warnings or errors, it stopped working.

In syslog (systemd-journald) I see these messages on boot, just after systemd printed "Starting Basic System":

Sep 17 hh:mm:59 hostname auditd[685]: Unable to open /var/log/audit/audit.log (Permission denied)
Sep 17 hh:mm:59 hostname auditd[685]: The audit daemon is exiting.
Sep 17 hh:mm:59 hostname audit[1]: <audit-1130> pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u
Sep 17 hh:mm:59 hostname audit[1]: <audit-1130> pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u
Sep 17 hh:mm:59 hostname audit[685]: <audit-1400> avc:  denied  { read append } for  pid=685 comm="audit
Sep 17 hh:mm:59 hostname audit[685]: <audit-1300> arch=c000003e syscall=2 success=no exit=-13 a0=7ffcd38
Sep 17 hh:mm:59 hostname audit: <audit-1307> cwd="/"
Sep 17 hh:mm:59 hostname audit: <audit-1302> item=0 name="/var/log/audit/audit.log" inode=2107312 dev=00
Sep 17 hh:mm:59 hostname audit: <audit-1327> proctitle=2F7362696E2F617564697464002D6E

I am still getting syslog messages from a process named "audit", but not from the "auditd" unit.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.13.1-128.13.fc22.noarch

How reproducible:
On every boot

Expected results:
auditd must be allowed to append to /var/log/audit/audit.log and it probably should be allowed to read from this file (I am not sure about that).

Additional info:
If you don't feel this issue is security-sensitive, feel free to change the bug status.
Comment 1 Christian Stadelmann 2015-09-19 04:30:44 EDT
Sorry, this bug is not security-sensitive. You can make it public.

I originally thought it were security sensitive, but it just prevents auditd from logging, not selinux from working.
Comment 2 Miroslav Grepl 2015-10-12 07:15:26 EDT
Could you attach raw AVC msgs?
Comment 3 Christian Stadelmann 2015-10-12 08:11:41 EDT
How do I do that? Is that what I see in systemd's journalctl message?
Comment 4 Miroslav Grepl 2015-10-13 07:07:44 EDT
Execute

# seteneforce 0; setenforce 1

then try to reproduce it and run

# ausearch -m avc -ts recent
Comment 5 Miroslav Grepl 2015-10-13 07:08:55 EDT
You can also search them in /var/log/audit/audit.log.
Comment 6 Christian Stadelmann 2015-10-13 12:14:26 EDT
There is nothing in /var/log/audit/audit.log for that time period the issue was present. Last entry was on 2015-09-15, first new entry on 2015-09-27.

This issue has no more been present since updating to selinux-policy-targeted-3.13.1-128.16.fc22 from 3.13.1-128.13.fc22.

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