Bug 1264510 - SELinux is preventing auditd from { read append } access to /var/log/audit/audit.log
Summary: SELinux is preventing auditd from { read append } access to /var/log/audit/au...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: All
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 16:04 UTC by Christian Stadelmann
Modified: 2015-11-10 08:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-10 08:11:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Stadelmann 2015-09-18 16:04:19 UTC
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 08:30:44 UTC
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 11:15:26 UTC
Could you attach raw AVC msgs?

Comment 3 Christian Stadelmann 2015-10-12 12:11:41 UTC
How do I do that? Is that what I see in systemd's journalctl message?

Comment 4 Miroslav Grepl 2015-10-13 11:07:44 UTC
Execute

# seteneforce 0; setenforce 1

then try to reproduce it and run

# ausearch -m avc -ts recent

Comment 5 Miroslav Grepl 2015-10-13 11:08:55 UTC
You can also search them in /var/log/audit/audit.log.

Comment 6 Christian Stadelmann 2015-10-13 16:14:26 UTC
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.