Red Hat Bugzilla – Bug 802644
segfault when attempting to detach non-existent network device
Last modified: 2012-06-20 02:50:03 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:
Author: Guannan Ren <firstname.lastname@example.org>
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.
A backported fix has been posted to rhvirt-patches for inclusion in the RHEL build of libvirt:
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
1.# rpm -q libvirt
2.Prepare the following xml.
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.
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.
(This bug was never in a released version of libvirt, so no thecnical note is required)
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.