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 668692 - qemu process is spawned with no supplementary groups
Summary: qemu process is spawned with no supplementary groups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 664406
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-11 09:46 UTC by RHEL Program Management
Modified: 2013-01-11 03:42 UTC (History)
18 users (show)

Fixed In Version: libvirt-0.8.1-27.el6_0.6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-02 18:22:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0479 0 normal SHIPPED_LIVE Moderate: libvirt security and bug fix update 2011-05-02 18:22:36 UTC

Description RHEL Program Management 2011-01-11 09:46:58 UTC
This bug has been copied from bug #664406 and has been proposed
to be backported to 6.0 z-stream (EUS).

Comment 5 Laine Stump 2011-01-27 15:48:25 UTC
Rebases of the two upstream commits noted below have been posted to rhvirt-patches:


commit d596c6dc9b64ca0c910a87127de72ed2ef47b692
Author: Laine Stump <laine>
Date:   Thu Dec 23 01:44:02 2010 -0500

    new virSetUIDGID() utility function
    
commit f42cf7cb7902196382a65e5316c974a5c2106401
Author: Laine Stump <laine>
Date:   Tue Dec 21 15:34:41 2010 -0500

    Replace setuid/setgid/initgroups with virSetUIDGID()

Comment 8 wangyimiao 2011-04-26 11:52:03 UTC
Sorry for comment 7,Setps same as bug 64406. 
Issue reproduce on build libvirt-0.8.1-27.el6_0.6.x86_64:

steps:
1, setup a NFS server with exports configuration as follows
/tmp/nfstest  *(rw,root_squash)

2, copy a guest image file into the shared fold. Using chmod+chown to set the
access right ,ownership and groupship of the image file to (otheruser):kvm, the
other user
shouldn't be qemu.

# chown 500:36  http_test.qcow2
# chmod 755 http_test.qcow2

3, In the client machine, mount the NFS shared folder, then, try to boot up a
guest which use the image file as its OS disk.


[reproducer]
# virsh start test
error: Failed to start domain test
error: internal error Process exited while reading console log output: char
device redirected to /dev/pts/8
qemu: could not open disk image /mnt/http_test.qcow2: Permission denied

Comment 9 Jiri Denemark 2011-04-26 14:17:02 UTC
You're doing ``chmod 755 http_test.qcow2'' which means qemu (a member of kvm group) will only be able to read or execute the image while it most likely wants to open that file in rw mode. You should rather do ``chmod 664 http_test.qcow2'' (or 775 if you want the execute permission as well).

Comment 10 Dave Allan 2011-04-27 04:07:17 UTC
Moving back to ON_QA per comment 9.

Comment 11 wangyimiao 2011-04-27 07:50:03 UTC
Setps same as bug 664406 comment 10. 
Verified it build libvirt-0.8.1-27.el6_0.6.x86_64:

steps:
On NFS Server:
1.Make a NFS share path, and use chmod to change it have all permissions.
# mkdir /tmp/nfstest

2.Setup a NFS server with exports configuration as follows.
/tmp/nfstest  *(rw,root_squash)

3.Copy a guest image file into the shared fold. Using chmod+chown to set the
access right ,ownership and groupship of the image file to (otheruser):kvm, the
other user
shouldn't be qemu.

# chown 500:36  rhel61.img
# chmod 664 rhel61.img
# ll -Z rhel61.img 
-rw-rw-r--. ken kvm unconfined_u:object_r:user_tmp_t:s0 rhel61.img


On clinet:

4. In the client machine, mount the NFS shared folder, then, try to boot up a
guest which use the image file as its OS disk.

# mount -o vers=3 10.66.4.210:/tmp/nfstest/ /mnt

5.# virsh start vm2
Domain vm2 started

the ownership wasn't changed by qemu , and it kept kvm group .
# ll -Z /mnt/
-rw-rw-r--. zpeng kvm system_u:object_r:nfs_t:s0       rhel61.img 

So set bug status to VERIFIED

Comment 12 errata-xmlrpc 2011-05-02 18:22:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0479.html


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