libvirt/src/xen
Jim Fehlig 0e671a1646 xen: fix memory corruption in legacy driver
Commit 632180d1 introduced memory corruption in xenDaemonListDefinedDomains
by starting to populate the names array at index -1, causing all sorts
of havoc in libvirtd such as aborts like the following

*** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x00007fffe00ccf20 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7abf6)[0x7ffff3fa0bf6]
/lib64/libc.so.6(+0x7b973)[0x7ffff3fa1973]
/lib64/libc.so.6(xdr_array+0xde)[0x7ffff403cbae]
/usr/sbin/libvirtd(+0x50251)[0x5555555a4251]
/lib64/libc.so.6(xdr_free+0x15)[0x7ffff403ccd5]
/usr/lib64/libvirt.so.0(+0x1fad34)[0x7ffff76b1d34]
/usr/lib64/libvirt.so.0(virNetServerProgramDispatch+0x1fc)[0x7ffff76b16f1]
/usr/lib64/libvirt.so.0(+0x1f214a)[0x7ffff76a914a]
/usr/lib64/libvirt.so.0(+0x1f222d)[0x7ffff76a922d]
/usr/lib64/libvirt.so.0(+0xbcc4f)[0x7ffff7573c4f]
/usr/lib64/libvirt.so.0(+0xbc5e5)[0x7ffff75735e5]
/lib64/libpthread.so.0(+0x7e0f)[0x7ffff48f7e0f]
/lib64/libc.so.6(clone+0x6d)[0x7ffff400e7dd]

Fix by initializing ret to 0 and only setting to error on failure path.
2013-08-05 10:38:52 -06:00
..
block_stats.c Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files 2013-07-10 17:40:13 +01:00
block_stats.h Convert Xen domain stats/peek driver methods to use virDomainDefPtr 2013-05-21 16:11:39 +01:00
xen_driver.c Fix probing of legacy Xen driver to not leave URI set 2013-07-29 11:28:09 +01:00
xen_driver.h src/xen: Remove the whitespace before ';' 2013-05-21 23:41:44 +08:00
xen_hypervisor.c xen: Add interface versions for Xen 4.3 2013-07-17 10:03:58 -06:00
xen_hypervisor.h Convert Xen domain stats/peek driver methods to use virDomainDefPtr 2013-05-21 16:11:39 +01:00
xen_inotify.c Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files 2013-07-10 17:40:13 +01:00
xen_inotify.h Simplify opening of Xen drivers 2013-05-09 13:16:19 +01:00
xend_internal.c xen: fix memory corruption in legacy driver 2013-08-05 10:38:52 -06:00
xend_internal.h Convert Xen domain core dump driver methods to use virDomainDefPtr 2013-05-21 16:11:39 +01:00
xm_internal.c Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files 2013-07-10 17:40:13 +01:00
xm_internal.h Convert Xen domain stats/peek driver methods to use virDomainDefPtr 2013-05-21 16:11:39 +01:00
xs_internal.c Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files 2013-07-10 17:40:13 +01:00
xs_internal.h Simplify the Xen domain get info/state driver methods 2013-05-09 13:16:20 +01:00