Bug 802644 - segfault when attempting to detach non-existent network device
segfault when attempting to detach non-existent network device
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Laine Stump
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-13 03:32 EDT by Laine Stump
Modified: 2012-06-20 02:50 EDT (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.9.10-6.el6
Doc Type: Bug Fix
Doc Text:
(This bug was never in a released version of libvirt, so no thecnical note is required)
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:50:03 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)

  None (edit)
Description Laine Stump 2012-03-13 03:32:36 EDT
The patches for Bug 691539 introduced a regression in network device detach. A fix has been pushed upstream, and needs to be backported to RHEL:

commit 19c7980ee6ca94308313b440fd39f308b4ae844e
Author: Guannan Ren <gren@redhat.com>
Date:   Mon Mar 12 23:50:02 2012 +0800

    qemu: fix segfault when detaching non-existent network device
    
    In qemuDomainDetachNetDevice, detach was being used before it had been
    validated. If no matching device was found, this resulted in a
    dereference of a NULL pointer.
    
    This behavior was a regression introduced in commit
    cf90342be0022520e25cfa258cef1034b229a100, so it has not been a part of
    any official libvirt release.
Comment 1 Laine Stump 2012-03-16 10:23:47 EDT
A backported fix has been posted to rhvirt-patches for inclusion in the RHEL build of libvirt:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-March/msg01463.html
Comment 4 hongming 2012-03-20 03:03:57 EDT
Use libvirt-0.9.10-4.el6.x86_64 to reproduce the bug.
#virsh detach-device rhel6 net.xml
error: Failed to detach device from net.xml
error: End of file while reading data:Input/Output error


Verify steps

1.# rpm -q libvirt
libvirt-0.9.10-6.el6.x86_64

2.Prepare the following xml.
<interface type='user'>
<mac address='02:11:22:33:44:55'/>
<model type='virtio'/>
</interface>
 
3.# virsh attach-device rhel6 net.xml
Device attached successfully

4.# virsh detach-device rhel6 net.xml
Device detached successfully

5.# virsh detach-device rhel6 net.xml
error: Failed to detach device from /home/net.xml
error: operation failed: network device 02:11:22:33:44:55 not found

So it is verified.
Comment 5 Laine Stump 2012-05-08 14:56:44 EDT
    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:
(This bug was never in a released version of libvirt, so no thecnical note is required)
Comment 7 errata-xmlrpc 2012-06-20 02:50:03 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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