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 855287 - SELinux is preventing /usr/libexec/qemu-kvm from getattr access on Posix Compliant FS storage type
Summary: SELinux is preventing /usr/libexec/qemu-kvm from getattr access on Posix Comp...
Keywords:
Status: CLOSED DUPLICATE of bug 835936
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: beta
: ---
Assignee: Miroslav Grepl
QA Contact: BaseOS QE Security Team
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-07 08:35 UTC by Anush Shetty
Modified: 2013-09-04 13:58 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-09 12:36:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Anush Shetty 2012-09-07 08:35:23 UTC
Description of problem: While installing the ISO on VM from RHEVM, we see some permission denied errors. Running sealert on audit log shows selinux preventing /usr/libexec/qemu-kvm from read access on the file in the storage mount. Selinux is set to permissive mode on RHS cluster and set to enforcing mode on the hypervisor which is a RHEL 6.3 machine. 


Version-Release number of selected component (if applicable): 
RHEL 6.3 on hypervisor
RHS2.0 on glusterfs servers with glusterfs-3.3.0rhsvirt1-2.el6_2.x86_64
rhevm-webadmin-portal-3.1.0-15.el6ev.noarch

How reproducible: Consistently


Steps to Reproduce:
1. Install ISO on VM from RHEVM
2.
3.
  

Actual results:

Installing from ISO on VM fails.


Expected results:

Should set the right selinux context and succeed.


Additional info:

Setting selinux to permissive mode on hypervisor fixes the issue.

sealert output:

--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from read access on the file a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed read access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from getattr access on the filesystem /rhev/data-center/mnt/guido.lab.eng.blr.redhat.com:_iso1.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed getattr access on the guido.lab.eng.blr.redhat.com:_iso1 filesystem by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from getattr access on the file /rhev/data-center/mnt/rhs-gp-srv11.lab.eng.blr.redhat.com:_distribute-replicate-2x2/62bebb34-33c1-4329-9b69-e88dda3dc482/images/42256c4d-bd84-4a69-b4f8-87350114c140/a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed getattr access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from 'read, write' accesses on the file a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed read write access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from getattr access on the filesystem /rhev/data-center/mnt/guido.lab.eng.blr.redhat.com:_iso1.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed getattr access on the guido.lab.eng.blr.redhat.com:_iso1 filesystem by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from getattr access on the file /rhev/data-center/mnt/rhs-gp-srv11.lab.eng.blr.redhat.com:_distribute-replicate-2x2/62bebb34-33c1-4329-9b69-e88dda3dc482/images/42256c4d-bd84-4a69-b4f8-87350114c140/a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed getattr access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from 'read, write' accesses on the file a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed read write access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


--------------------------------------------------------------------------------

SELinux is preventing /usr/libexec/qemu-kvm from read access on the file a4926e06-3921-4413-a74a-81ba527af74a.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed read access on the a4926e06-3921-4413-a74a-81ba527af74a file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Comment 6 Miroslav Grepl 2012-10-09 12:36:24 UTC

*** This bug has been marked as a duplicate of bug 835936 ***


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