Bug 609493 - SELinux is preventing /bin/bash "read" access on /var/lib/libvirt/libvirt-guests.
Summary: SELinux is preventing /bin/bash "read" access on /var/lib/libvirt/libvir...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
Whiteboard: setroubleshoot_trace_hash:586d93f0bf6...
: 609494 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-30 12:37 UTC by Matěj Cepl
Modified: 2012-10-15 14:06 UTC (History)
6 users (show)

Clone Of:
Last Closed: 2010-11-10 21:35:05 UTC

Attachments (Terms of Use)

Description Matěj Cepl 2010-06-30 12:37:58 UTC

SELinux is preventing /bin/bash "read" access on

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

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 13:03:18 UTC
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

Comment 3 Miroslav Grepl 2010-06-30 13:57:58 UTC
which process is running as initrc_t?

ps -eZ | grep initrc

Comment 4 Miroslav Grepl 2010-06-30 13:58:35 UTC
*** Bug 609494 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2010-06-30 13:59:01 UTC
*** Bug 609495 has been marked as a duplicate of this bug. ***

Comment 6 Matěj Cepl 2010-06-30 22:08:53 UTC
(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

Comment 7 Miroslav Grepl 2010-07-01 16:20:48 UTC
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 20:58:23 UTC
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 17:53:59 UTC
it looks like different issue.

Comment 10 Miroslav Grepl 2010-07-07 12:47:38 UTC
Matej I guess you removed unconfined.pp module, right?

Comment 11 Carl G. 2010-07-09 00:13:13 UTC
Also present on Rawhide.

Comment 12 Matěj Cepl 2010-07-12 09:52:58 UTC
(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

Comment 13 Daniel Walsh 2010-07-12 15:31:12 UTC
Miroslav add


Comment 15 Miroslav Grepl 2010-07-14 14:27:46 UTC
Fixed in selinux-policy-3.7.19-32.el6.noarch

Comment 18 releng-rhel@redhat.com 2010-11-10 21:35:05 UTC
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.