Bug 1465031 - init denied to read modprobe.d
init denied to read modprobe.d
Status: CLOSED DUPLICATE of bug 1438937
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: Lukas Vrabec
BaseOS QE Security Team
Depends On:
Blocks: 1470965 1472751
  Show dependency treegraph
Reported: 2017-06-26 08:56 EDT by Karel Volný
Modified: 2017-09-07 12:33 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-09-07 12:33:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Karel Volný 2017-06-26 08:56:37 EDT
Filed from caserun https://tcms.engineering.redhat.com/run/309346/#caserun_15657288

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

Steps to Reproduce: 
run the test

Actual results: 
type=PROCTITLE msg=audit(1498229041.232:88): proctitle=2F62696E2F62617368002F7573722F6C6962657865632F69707461626C65732F6970367461626C65732E696E6974007374617274
type=SYSCALL msg=audit(1498229041.232:88): arch=c00000b7 syscall=56 success=no exit=-13 a0=ffffffffffffff9c a1=235460a0 a2=84800 a3=0 items=0 ppid=1 pid=19208 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ip6tables.init" exe="/usr/bin/bash" subj=system_u:system_r:iptables_t:s0 key=(null)
type=AVC msg=audit(1498229041.232:88): avc:  denied  { read } for  pid=19208 comm="ip6tables.init" name="modprobe.d" dev="dm-0" ino=100912890 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:modules_conf_t:s0 tclass=dir permissive=0

Expected results:
Comment 2 Thomas Woerner 2017-07-06 11:41:08 EDT
Have you tried to relabel modprobe.d with "restorecon -rvF /etc/modprobe.d"?
Comment 4 Tomas Dolezal 2017-08-08 05:40:54 EDT
granting qa_ack for 7.5; RPL
Comment 5 Trevor Hemsley 2017-08-30 09:42:12 EDT
I am also seeing this - on each reboot I get 6 selinux denials logged in my audit.log - one for each file in /etc/modprobe.d/*.conf. The code in question comes from line 212 in /usr/libexec/iptables/iptables.init where it is trying to determine if ipv6 has been disabled.

Files in /etc/modprobe.d/*.conf look correctly labeled to me and restorecon -RvF /etc/modprobe.d returns no output showing that it made no changes - thus answering the question about trying the relabel.

type=AVC msg=audit(1504094765.370:28): avc:  denied  { read } for  pid=661 comm="grep" name="blacklist-iscsi.conf" dev="dm-0" ino=782889 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:modules_conf_t:s0 tclass=file

Problem only happens when iptables.service is started by systemd as part of the boot. If you run systemctl restart iptables then nothing is logged. Running the AVCs through audit2allow generates:

require {
        type iptables_t;
        type modules_conf_t;
        class file read;

#============= iptables_t ==============
allow iptables_t modules_conf_t:file read;
Comment 6 Phil Sutter 2017-09-07 08:05:40 EDT
So this seems like just a case of missing selinux policy, therefore moving this ticket to selinux-policy component.
Comment 8 Milos Malik 2017-09-07 09:53:44 EDT
I believe this bug is a duplicate of BZ#1438937.
Comment 9 Phil Sutter 2017-09-07 12:33:41 EDT
(In reply to Milos Malik from comment #8)
> I believe this bug is a duplicate of BZ#1438937.

Yes, indeed. Thanks for spotting it!

*** This bug has been marked as a duplicate of bug 1438937 ***

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