Bug 609493 - SELinux is preventing /bin/bash "read" access on /var/lib/libvirt/libvirt-guests.
SELinux is preventing /bin/bash "read" access on /var/lib/libvirt/libvir...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
setroubleshoot_trace_hash:586d93f0bf6...
:
: 609494 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-30 08:37 EDT by Matěj Cepl
Modified: 2012-10-15 10:06 EDT (History)
6 users (show)

See Also:
Fixed In Version: selinux-policy-3.7.19-32.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:35:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2010-06-30 08:37:58 EDT
Souhrn:

SELinux is preventing /bin/bash "read" access on
/var/lib/libvirt/libvirt-guests.

Podrobný popis:

SELinux denied access requested by S98libvirt-gues. It is not expected that this
access is required by S98libvirt-gues and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Povolení přístupu:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Další informace:

Kontext zdroje                system_u:system_r:initrc_t:s0
Kontext cíle                 staff_u:object_r:virt_var_lib_t:s0
Objekty cíle                 /var/lib/libvirt/libvirt-guests [ file ]
Zdroj                         S98libvirt-gues
Cesta zdroje                  /bin/bash
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          bash-4.1.2-3.el6
RPM balíčky cíle           
RPM politiky                  selinux-policy-3.7.19-27.el6
Selinux povolen               True
Typ politiky                  targeted
Vynucovací režim            Enforcing
Název zásuvného modulu     catchall
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.32-37.el6.x86_64 #1
                              SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64
Počet upozornění           2
Poprvé viděno               St 30. červen 2010, 14:32:32 CEST
Naposledy viděno             St 30. červen 2010, 14:32:32 CEST
Místní ID                   928b813f-a376-4209-b967-d1f0dc4260bf
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1277901152.8:12): avc:  denied  { read } for  pid=1955 comm="S98libvirt-gues" name="libvirt-guests" dev=dm-1 ino=260642 scontext=system_u:system_r:initrc_t:s0 tcontext=staff_u:object_r:virt_var_lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1277901152.8:12): arch=c000003e syscall=2 success=no exit=-13 a0=a92420 a1=0 a2=1b6 a3=76 items=0 ppid=1252 pid=1955 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="S98libvirt-gues" exe="/bin/bash" subj=system_u:system_r:initrc_t:s0 key=(null)



Hash String generated from  catchall,S98libvirt-gues,initrc_t,virt_var_lib_t,file,read
audit2allow suggests:

#============= initrc_t ==============
allow initrc_t virt_var_lib_t:file read;
Comment 2 RHEL Product and Program Management 2010-06-30 09:03:18 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Miroslav Grepl 2010-06-30 09:57:58 EDT
Matej,
which process is running as initrc_t?

ps -eZ | grep initrc
Comment 4 Miroslav Grepl 2010-06-30 09:58:35 EDT
*** Bug 609494 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2010-06-30 09:59:01 EDT
*** Bug 609495 has been marked as a duplicate of this bug. ***
Comment 6 Matěj Cepl 2010-06-30 18:08:53 EDT
(In reply to comment #3)
> Matej,
> which process is running as initrc_t?
> 
> ps -eZ | grep initrc    

johanka:~$ sudo virsh list
[sudo] password for matej: 
 Id Jméno               Stav
----------------------------------
  1 tikanga              běží

johanka:~$ ps -eZ | grep initrc
johanka:~$
Comment 7 Miroslav Grepl 2010-07-01 12:20:48 EDT
Matej,
how is /usr/bin/virsh labeled?

ls -Z /usr/bin/virsh 
-rwxr-xr-x. root root system_u:object_r:xm_exec_t:s0   /usr/bin/virsh


It looks like as #606314 bug.
Comment 8 Jiri Denemark 2010-07-01 16:58:23 EDT
No it isn't the same thing as bug 606314. This time the libvirt-guests init script itself is denied access to /var/lib/libvirt/libvirt-guests. The init script is supposed to do anything with that file (read, write, create, remove).
Comment 9 Miroslav Grepl 2010-07-02 13:53:59 EDT
Yes,
it looks like different issue.
Comment 10 Miroslav Grepl 2010-07-07 08:47:38 EDT
Ok, 
Matej I guess you removed unconfined.pp module, right?
Comment 11 Carl G. 2010-07-08 20:13:13 EDT
Also present on Rawhide.
Comment 12 Matěj Cepl 2010-07-12 05:52:58 EDT
(In reply to comment #10)
> Ok, 
> Matej I guess you removed unconfined.pp module, right?    

Yes, you're right.

johanka:~# semodule -l |grep -w unconfined
unconfined	3.1.1	Disabled
johanka:~#
Comment 13 Daniel Walsh 2010-07-12 11:31:12 EDT
Miroslav add

	virt_manage_lib_files(initrc_t)
Comment 15 Miroslav Grepl 2010-07-14 10:27:46 EDT
Fixed in selinux-policy-3.7.19-32.el6.noarch
Comment 18 releng-rhel@redhat.com 2010-11-10 16:35:05 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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