Bug 720773 - (CVE-2011-2527) CVE-2011-2527 qemu: when started as root, extra groups are not dropped correctly
CVE-2011-2527 qemu: when started as root, extra groups are not dropped correctly
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
public=20110709,reported=20110712,sou...
: Security
Depends On: 720784 720785 722582 722583
Blocks: 720787
  Show dependency treegraph
 
Reported: 2011-07-12 14:11 EDT by Vincent Danen
Modified: 2016-11-08 10:51 EST (History)
18 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: qemu did not properly drop extra group privileges when started as root with the -runas commandline option. Consequence: extra GID's would give qemu elevated privileges to read or write files that the supplementary groups allowed, because qemu is still running with group root privileges. Fix: Added an initgroups(3) call to use the -runas user's /etc/groups membership to update the supplementary group IDs. Result: extra group privileges are now properly dropped when using -runas.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-12 14:38:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
upstream patch (1.47 KB, patch)
2011-07-14 14:16 EDT, Vincent Danen
no flags Details | Diff

  None (edit)
Description Vincent Danen 2011-07-12 14:11:34 EDT
It was reported [1] that qemu did not properly drop extra group privileges when started as root with the -runas commandline option.  This means that the extra GID's would give qemu elevated privileges to read or write files that the supplementary groups allowed, because qemu is still running with group root privileges 

When qemu is used by libvirt or vdsm (to launch KVM), however, libvirt itself drops privileges prior to launching qemu, so when started in this fashion there is no elevation of privileges to the qemu process.

[1] https://bugs.launchpad.net/qemu/+bug/807893
Comment 1 Vincent Danen 2011-07-12 14:26:19 EDT
A proposed patch is available here:

https://bugs.launchpad.net/qemu/+bug/807893/comments/1

This also only affects qemu versions greater than 0.10.0 (where the -runas option was introduced).
Comment 2 Vincent Danen 2011-07-12 14:27:53 EDT
Created qemu tracking bugs for this issue

Affects: fedora-all [bug 720784]
Affects: epel-5 [bug 720785]
Comment 3 Vincent Danen 2011-07-14 14:16:02 EDT
Created attachment 513239 [details]
upstream patch

Commit cc4662f9642995c78bed587707eeb9ad8500035b from upstream to fix the flaw.
Comment 5 Petr Matousek 2011-07-15 14:54:35 EDT
Statement:

Future qemu-kvm updates in Red Hat Enterprise Linux 6 may address this flaw. This issue did not affect the versions of qemu-kvm as shipped with Red Hat Enterprise Linux 5 as it did not include support for "run as" functionality.
Comment 7 Eduardo Habkost 2011-11-17 11:32:55 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: qemu did not properly drop extra group privileges when started as root with the -runas commandline option.

Consequence: extra GID's would give qemu elevated privileges to read or write files that the supplementary groups allowed, because qemu is still running with group root privileges.

Fix:  Added an initgroups(3) call to use the -runas user's /etc/groups membership to update the supplementary group IDs.

Result: extra group privileges are now properly dropped when using -runas.
Comment 8 errata-xmlrpc 2011-12-06 10:53:17 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:1531 https://rhn.redhat.com/errata/RHSA-2011-1531.html
Comment 9 Fedora Update System 2012-06-07 19:06:52 EDT
qemu-0.14.0-9.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

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