Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 802644

Summary: segfault when attempting to detach non-existent network device
Product: Red Hat Enterprise Linux 6 Reporter: Laine Stump <laine>
Component: libvirtAssignee: Laine Stump <laine>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, ajia, dallan, dyuan, honzhang, mshao, mzhan, rwu, weizhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 06:50:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Laine Stump 2012-03-13 07:32:36 UTC
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>
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 14:23:47 UTC
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 07:03:57 UTC
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 18:56:44 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:
(This bug was never in a released version of libvirt, so no thecnical note is required)

Comment 7 errata-xmlrpc 2012-06-20 06:50:03 UTC
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