Bug 844745

Summary: CVE-2012-3445 libvirt: crash in virTypedParameterArrayClear [fedora-all]
Product: [Fedora] Fedora Reporter: Petr Matousek <pmatouse>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 16CC: berrange, clalancette, dougsland, eblake, itamar, jforbes, jyang, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:11:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 844734    

Description Petr Matousek 2012-07-31 11:39:48 EDT
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected Fedora

For comments that are specific to the vulnerability please use bugs filed
against "Security Response" product referenced in the "Blocks" field.

For more information see:

When creating a Bodhi update request, please include this bug ID and the
bug IDs of this bug's parent bugs filed against the "Security Response"
product (the top-level CVE bugs).  Please mention the CVE IDs being fixed
in the RPM changelog when available.

Bodhi update submission link:

Please note: this issue affects multiple supported versions of Fedora.
Only one tracking bug has been filed; please ensure that it is only closed
when all affected versions are fixed.

[bug automatically created by: add-tracking-bugs]
Comment 1 Eric Blake 2012-08-01 18:33:02 EDT
I've gone ahead and backported this commit:

commit 6039a2cb49c8af4c68460d2faf365a7e1c686c7b
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Mon Jul 30 12:14:54 2012 +0200

    daemon: Fix crash in virTypedParameterArrayClear
    Daemon uses the following pattern when dispatching APIs with typed
        VIR_ALLOC_N(params, nparams);
        virDomain*(dom, params, &nparams, flags);
        virTypedParameterArrayClear(params, nparams);
    In case nparams was originally set to 0, virDomain* API would fill it
    with the number of typed parameters it can provide and we would use this
    number (rather than zero) to clear params. Because VIR_ALLOC* returns
    non-NULL pointer even if size is 0, the code would end up walking
    through random memory. If we were lucky enough and the memory contained
    7 (VIR_TYPED_PARAM_STRING) at the right place, we would try to free a
    random pointer and crash.
    Let's make sure params stays NULL when nparams is 0.

into v0.9.{6,11}-maint, which means the next release cut from those two branches will fix F16 and F17.  Rawhide will be fixed when it rebases to 0.10.0-rc0 or newer.  Therefore, I'm moving this to POST.
Comment 2 Fedora Update System 2012-08-13 19:16:37 EDT
libvirt- has been submitted as an update for Fedora 16.
Comment 3 Fedora Update System 2012-08-14 05:20:10 EDT
Package libvirt-
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-08-22 17:11:22 EDT
libvirt- has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.