RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1181476 - selinux: AVC error during iSCSI boot install
Summary: selinux: AVC error during iSCSI boot install
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-13 09:38 UTC by Bruno Goncalves
Modified: 2015-11-19 10:25 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-3.13.1-30.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 10:25:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description Bruno Goncalves 2015-01-13 09:38:10 UTC
Description of problem:
There are some AVC messages during OS install.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-14.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.Install OS on iSCSI boot server
2.Check for AVC after install is completed
3.----
time->Tue Jan 13 04:00:45 2015
type=SYSCALL msg=audit(1421139645.547:52): arch=c000003e syscall=59 success=yes exit=0 a0=256ac80 a1=26fda10 a2=26d3ad0 a3=7fff283b3120 items=0 ppid=8687 pid=8696 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iscsiadm" exe="/usr/sbin/iscsiadm" subj=system_u:system_r:iscsid_t:s0 key=(null)
type=AVC msg=audit(1421139645.547:52): avc:  denied  { write } for  pid=8696 comm="iscsiadm" path="/var/tmp/dracut-log.Cbwq3e/systemd-cat" dev="dm-1" ino=117730600 scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:object_r:kdumpctl_tmp_t:s0 tclass=fifo_file
----

Additional info:
Running '/usr/sbin/sestatus'
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
Running 'rpm -q selinux-policy || true'
selinux-policy-3.13.1-14.el7.noarch

Comment 2 Milos Malik 2015-01-13 10:11:19 UTC
It looks like a leaked file descriptor.

Comment 5 Miroslav Grepl 2015-04-27 14:34:11 UTC
Is this a redirection?

Comment 6 Dave Young 2015-05-04 07:42:29 UTC
Minfei, can you have a look and answer questions in comment #5?

Comment 7 Minfei Huang 2015-05-18 13:49:25 UTC
For now, I found that the denied message will appear, if kdump generates the initramfs during the kernel boot. In the other word, if someone flips the option force_rebuild, the denied message will always appear, otherwise it is fine.

Also, the denied message never appear, if I am disable the kdump service by systemctl.

Comment 8 Minfei Huang 2015-05-19 07:50:12 UTC
(In reply to Milos Malik from comment #2)
> It looks like a leaked file descriptor.

As commented above, the error message will appear, if kdump generates the initramfs when systemctl trys to start the kdump.service. But it is fine to start the kdump service manually using "kdumpctl start".

So I think this issue may concern with systemd which may do not start kdump service correctly in selinux policy.

Thanks
Minfei

Comment 9 Minfei Huang 2015-05-19 09:28:48 UTC
(In reply to Miroslav Grepl from comment #5)
> Is this a redirection?

Hi, Grepl.

As you commented it may concern with redirection issue, I tried to remove the pipe and redirection where kdump uses iscsiadm to get iscsi info. And the error message still appear from the selinux. Following it the code which kdump calls.

1) 
473     # Check once before getting explicit values, so we can output a decent
474     # error message.
475
476     if ! /sbin/iscsiadm -m session -r ${path} >/dev/null ; then
477         derror "Unable to find iscsi record for $path"
478         return 1
479     fi

2)
432     result=$(/sbin/iscsiadm --show -m session -r ${1} | grep "^${2} = ")
433     result=${result##* = }
434     echo $result

Thanks
Minfei

Comment 10 Lukas Vrabec 2015-06-29 11:12:33 UTC
commit f29ce6902d8eb72d5badd64c06af011e100383ce
Author: Lukas Vrabec <lvrabec>
Date:   Mon Jun 29 13:06:55 2015 +0200

    Allow iscsid write to fifo file kdumpctl_tmp_t. Appears when kdump generates the initramfs during the kernel boot. BZ(1181476)

Comment 14 Miroslav Vadkerti 2015-10-05 14:45:54 UTC
Moving back to correct state

Comment 16 errata-xmlrpc 2015-11-19 10:25:03 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-2300.html


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