Bug 720773 (CVE-2011-2527) - CVE-2011-2527 qemu: when started as root, extra groups are not dropped correctly
Summary: CVE-2011-2527 qemu: when started as root, extra groups are not dropped correctly
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2011-2527
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 720784 720785 722582 722583
Blocks: 720787
TreeView+ depends on / blocked
 
Reported: 2011-07-12 18:11 UTC by Vincent Danen
Modified: 2021-02-24 15:04 UTC (History)
18 users (show)

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.
Clone Of:
Environment:
Last Closed: 2012-06-12 18:38:29 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 0 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description Vincent Danen 2011-07-12 18:11:34 UTC
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 18:26:19 UTC
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 18:27:53 UTC
Created qemu tracking bugs for this issue

Affects: fedora-all [bug 720784]
Affects: epel-5 [bug 720785]

Comment 3 Vincent Danen 2011-07-14 18:16:02 UTC
Created attachment 513239 [details]
upstream patch

Commit cc4662f9642995c78bed587707eeb9ad8500035b from upstream to fix the flaw.

Comment 5 Petr Matousek 2011-07-15 18:54:35 UTC
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 16:32:55 UTC
    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 15:53:17 UTC
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 23:06:52 UTC
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.