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 1088904 - Selinux AVC raises when cmpi-fsvol is used
Summary: Selinux AVC raises when cmpi-fsvol is used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 1231640
TreeView+ depends on / blocked
 
Reported: 2014-04-17 12:05 UTC by Robin Hack
Modified: 2015-11-19 10:22 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
AVCs caused by various providers (80.36 KB, text/plain)
2014-12-02 13:48 UTC, Milos Malik
no flags Details


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 Robin Hack 2014-04-17 12:05:57 UTC
How reproducible:
always

Actual results:

Info: Searching AVC errors produced since 1397689570.54 (Thu Apr 17 01:06:10 2014)
Searching logs...
Running '/usr/bin/env LC_ALL=en_US.UTF-8 /sbin/ausearch -m AVC -m USER_AVC -m SELINUX_ERR -ts 04/17/2014 01:06:10 < /dev/null >/mnt/testarea/tmp.rhts-db-submit-result.WO0bns 2>&1'
----
time->Thu Apr 17 01:06:11 2014
type=SYSCALL msg=audit(1397689571.461:3195): arch=c000003e syscall=6 success=yes exit=0 a0=7f6e480043f0 a1=7f6e59705300 a2=7f6e59705300 a3=7f6e48000078 items=0 ppid=1 pid=23548 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="cimprovagt" exe="/usr/libexec/pegasus/cimprovagt" subj=system_u:system_r:pegasus_t:s0 key=(null)
type=AVC msg=audit(1397689571.461:3195): avc:  denied  { getattr } for  pid=23548 comm="cimprovagt" path="/dev/loop0" dev="devtmpfs" ino=599604 scontext=system_u:system_r:pegasus_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file
Fail: AVC messages found.
Checking for errors...
Using stronger AVC checks.
	Define empty RHTS_OPTION_STRONGER_AVC parameter if this causes any problems.
Running 'cat /mnt/testarea/tmp.rhts-db-submit-result.WO0bns | /sbin/ausearch -m AVC -m SELINUX_ERR'
Fail: AVC messages found.
Running 'cat %s | /sbin/ausearch -m USER_AVC >/mnt/testarea/tmp.rhts-db-submit-result.g3esQC 2>&1'
Info: No AVC messages found.
/bin/grep 'avc: ' /mnt/testarea/dmesg.log | /bin/grep --invert-match TESTOUT.log
No AVC messages found in dmesg
Running '/usr/sbin/sestatus'
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
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.12.1-153.el7.noarch


Expected results:
audit2allow:
#============= pegasus_t ==============
allow pegasus_t fixed_disk_device_t:blk_file getattr;



Additional info:

Comment 2 Miroslav Grepl 2014-04-18 08:54:12 UTC
It looks there is a missing label for a provider. Which provider did you use?

Comment 3 Milos Malik 2014-04-18 09:25:51 UTC
I can reproduce the same AVC too, but there are no additional providers:

# ls -Z /usr/libexec/pegasus/
-rwxr-xr-x. root pegasus system_u:object_r:bin_t:s0       cimprovagt
#

Comment 4 Robin Hack 2014-04-18 13:09:23 UTC
(In reply to Milos Malik from comment #3)
> I can reproduce the same AVC too, but there are no additional providers:
> 
> # ls -Z /usr/libexec/pegasus/
> -rwxr-xr-x. root pegasus system_u:object_r:bin_t:s0       cimprovagt
> #

This looks like different bug. Good catch.


(In reply to Miroslav Grepl from comment #2)
> It looks there is a missing label for a provider. Which provider did you use?
I use sblim-cmpi-fsvol under tog-pegasus.

cimprovagt is just SO library loader.
sblim-cmpi-fsvol adds so libraries to different path:
/usr/lib64/cmpi/libcmpiOSBase_BlockStorageStatisticalDataProvider.so
/usr/lib64/cmpi/libcmpiOSBase_BootOSFromFSProvider.so
/usr/lib64/cmpi/libcmpiOSBase_HostedFileSystemProvider.so
/usr/lib64/cmpi/libcmpiOSBase_LocalFileSystemProvider.so
/usr/lib64/cmpi/libcmpiOSBase_NFSProvider.so
/usr/lib64/libcmpiOSBase_CommonFsvol.so.0
/usr/lib64/libcmpiOSBase_CommonFsvol.so.0.0.0

Comment 5 Robin Hack 2014-04-18 13:10:59 UTC
Additional info:
If you want to now which providers are installed just use:
# cimprovider -l
OperatingSystemModule
ComputerSystemModule
ProcessModule
SLPProviderModule
cmpiOSBase_BaseBoardProvider
cmpiOSBase_ComputerSystemProvider
cmpiOSBase_CSBaseBoardProvider
cmpiOSBase_CSProcessorProvider
cmpiOSBase_OperatingSystemProvider
cmpiOSBase_OperatingSystemStatisticalDataProvider
cmpiOSBase_OperatingSystemStatisticsProvider
cmpiOSBase_OSProcessProvider
cmpiOSBase_ProcessorProvider
cmpiOSBase_RunningOSProvider
cmpiOSBase_UnixProcessProvider
cmpiOSBase_BlockStorageStatisticalDataProvider
cmpiOSBase_BootOSFromFSProvider
cmpiOSBase_HostedFileSystemProvider
cmpiOSBase_LocalFileSystemProvider
cmpiOSBase_NFSProvider

Comment 6 RHEL Program Management 2014-04-26 05:47:24 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 Miroslav Grepl 2014-12-02 13:01:19 UTC
And how about permissive mode?

Comment 10 Milos Malik 2014-12-02 13:48:48 UTC
Created attachment 963754 [details]
AVCs caused by various providers

Comment 11 Milos Malik 2014-12-10 09:30:57 UTC
A dontaudit candidate?
----
type=PATH msg=audit(12/10/2014 10:17:10.213:570) : item=0 name=/root/.local/lib/python2.7/site-packages objtype=UNKNOWN 
type=CWD msg=audit(12/10/2014 10:17:10.213:570) :  cwd=/var/lib/Pegasus/cache/trace 
type=SYSCALL msg=audit(12/10/2014 10:17:10.213:570) : arch=x86_64 syscall=stat success=no exit=-13(Permission denied) a0=0x7fe334029fb0 a1=0x7fe33d7de840 a2=0x7fe33d7de840 a3=0x6b6361702d657469 items=1 ppid=1 pid=3801 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cimprovagt exe=/usr/libexec/pegasus/cimprovagt subj=system_u:system_r:pegasus_openlmi_storage_t:s0 key=(null) 
type=AVC msg=audit(12/10/2014 10:17:10.213:570) : avc:  denied  { search } for  pid=3801 comm=cimprovagt name=.local dev="vda3" ino=118746 scontext=system_u:system_r:pegasus_openlmi_storage_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir 
----

Comment 12 Milos Malik 2014-12-10 11:35:12 UTC
Appears in enforcing mode only:
----
type=PATH msg=audit(12/10/2014 12:20:14.793:2089) : item=0 name=/sys inode=1 dev=00:10 mode=dir,555 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 objtype=NORMAL 
type=CWD msg=audit(12/10/2014 12:20:14.793:2089) :  cwd=/var/lib/Pegasus/cache/trace 
type=SYSCALL msg=audit(12/10/2014 12:20:14.793:2089) : arch=x86_64 syscall=statfs success=no exit=-13(Permission denied) a0=0x7f27ce2ee2a0 a1=0x7f27d4264400 a2=0x7f27ce6fc2a0 a3=0x7f27d13082a0 items=1 ppid=1 pid=12647 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cimprovagt exe=/usr/libexec/pegasus/cimprovagt subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null) 
type=AVC msg=audit(12/10/2014 12:20:14.793:2089) : avc:  denied  { getattr } for  pid=12647 comm=cimprovagt name=/ dev="sysfs" ino=1 scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem 
----

Comment 17 Lukas Vrabec 2015-07-15 14:38:00 UTC
I'm fine with patch from Simon, just one thing, could I see avc related to this rule? 
allow pegasus_openlmi_storage_t etc_t:file create;

Thank you

Comment 18 Simon Sekidde 2015-07-15 20:01:44 UTC
(In reply to Lukas Vrabec from comment #17)
> I'm fine with patch from Simon, just one thing, could I see avc related to
> this rule? 
> allow pegasus_openlmi_storage_t etc_t:file create;

----
type=PATH msg=audit(12/02/2014 14:13:11.793:795) : item=1 name=/etc/mdadm.conf.anacbak objtype=CREATE 
type=PATH msg=audit(12/02/2014 14:13:11.793:795) : item=0 name=/etc/ inode=8388737 dev=fd:03 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:etc_t:s0 objtype=PARENT 
type=CWD msg=audit(12/02/2014 14:13:11.793:795) :  cwd=/var/lib/Pegasus/cache/trace 
type=SYSCALL msg=audit(12/02/2014 14:13:11.793:795) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=0x7f9c8ca43490 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x1 items=2 ppid=1 pid=7199 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cimprovagt exe=/usr/libexec/pegasus/cimprovagt subj=system_u:system_r:pegasus_openlmi_storage_t:s0 key=(null) 
type=AVC msg=audit(12/02/2014 14:13:11.793:795) : avc:  denied  { create } for  pid=7199 comm=cimprovagt name=mdadm.conf.anacbak scontext=system_u:system_r:pegasus_openlmi_storage_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file

Comment 19 Miroslav Grepl 2015-07-16 08:45:30 UTC
So we can add a filename transition rule.

Comment 20 Lukas Vrabec 2015-07-16 13:01:04 UTC
commit 7d530cb33f805c41eca18917cd57daa0ad01f625
Author: Lukas Vrabec <lvrabec>
Date:   Thu Jul 16 14:36:29 2015 +0200

    Allow pegasus_openlmi_storage_t create mdadm.conf.anacbak file in /etc.

commit d8cf9fbaa143635a73452e7109029cc6a2966a71
Author: Simon Sekidde <ssekidde>
Date:   Sun Jun 21 14:02:01 2015 -0400

    Add fixes to pegasus_openlmi_domain Resolves:#1088904

Comment 27 Alois Mahdal 2015-09-02 11:36:47 UTC
Sorry, neither I have no idea how to reproduce this.

Comment 30 errata-xmlrpc 2015-11-19 10:22:16 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.