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 927339 - SELinux is preventing /usr/bin/df from 'getattr' accesses on the blk_file /dev/dm-2.
Summary: SELinux is preventing /usr/bin/df from 'getattr' accesses on the blk_file /de...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.4
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard: abrt_hash:d3aae29bc8a8ddf394fb2dd86cb...
Depends On: 830521
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-25 17:16 UTC by David Kutálek
Modified: 2014-09-30 23:34 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.7.19-210.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 830521
Environment:
Last Closed: 2013-11-21 10:21:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1598 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-11-20 21:39:24 UTC

Description David Kutálek 2013-03-25 17:16:28 UTC
+++ This bug was initially created as a clone of Bug #830521 +++

Just met it in RHEL 6.4, too (with /dev/dm-6).

libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.0-1.fc17.x86_64
time:           So 10 Jun 2012 12:41:15 CEST

description:
:SELinux is preventing /usr/bin/df from 'getattr' accesses on the blk_file /dev/dm-2.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If sie denken, dass df standardmässig erlaubt sein sollte, getattr Zugriff auf dm-2 blk_file zu erhalten.
:Then sie sollten dies als Fehler melden.
:Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
:Do
:zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
:# grep df /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:logwatch_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:fixed_disk_device_t:s0
:Target Objects                /dev/dm-2 [ blk_file ]
:Source                        df
:Source Path                   /usr/bin/df
:Port                          <Unbekannt>
:Host                          (removed)
:Source RPM Packages           coreutils-8.15-6.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-128.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.4.0-1.fc17.x86_64 #1 SMP Sun Jun 3 06:35:17 UTC
:                              2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    So 10 Jun 2012 12:40:14 CEST
:Last Seen                     So 10 Jun 2012 12:40:14 CEST
:Local ID                      4d4a74d4-30cf-474d-9905-6f343d89ea42
:
:Raw Audit Messages
:type=AVC msg=audit(1339324814.625:136): avc:  denied  { getattr } for  pid=3938 comm="df" path="/dev/dm-2" dev="devtmpfs" ino=22710 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file
:
:
:type=SYSCALL msg=audit(1339324814.625:136): arch=x86_64 syscall=lstat success=no exit=EACCES a0=1523aa0 a1=7fffcd474e30 a2=7fffcd474e30 a3=1000 items=0 ppid=3936 pid=3938 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=df exe=/usr/bin/df subj=system_u:system_r:logwatch_t:s0-s0:c0.c1023 key=(null)
:
:Hash: df,logwatch_t,fixed_disk_device_t,blk_file,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

--- Additional comment from Miroslav Grepl on 2012-06-11 07:59:33 EDT ---

It looks like something what we could dontaudit.

Does everything work correctly?

--- Additional comment from Stefan Jensen on 2012-06-11 08:43:52 EDT ---

Yes, everything works correctly.

--- Additional comment from Daniel Walsh on 2012-06-11 09:13:20 EDT ---

I don't care if it is dontaudited or allowed, not really something we should be concerned with.

--- Additional comment from Stefan Jensen on 2012-06-18 12:25:50 EDT ---

Fixed with selinux-policy-targeted-3.10.0-130.fc17.noarch

Thanks!

Comment 6 Michal Trunecka 2013-08-12 13:31:08 UTC
VERIFIED using automated regression test:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

selinux-policy-3.7.19-211.el6.noarch
:: [   PASS   ] :: Checking for the presence of selinux-policy rpm 
:: [ 15:04:54 ] ::  Package versions:
:: [ 15:04:54 ] ::    selinux-policy-3.7.19-211.el6.noarch
selinux-policy-targeted-3.7.19-211.el6.noarch


....


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: bz#927339
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

   dontaudit logwatch_t fixed_disk_device_t : blk_file getattr ; 
:: [   PASS   ] :: sesearch --dontaudit -C -s logwatch_t -t fixed_disk_device_t -c blk_file -p getattr   (Expected 0, got 0)

Comment 7 errata-xmlrpc 2013-11-21 10:21:59 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.

http://rhn.redhat.com/errata/RHBA-2013-1598.html


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