[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.0-testing] xc: fix segfault in pv domain create if kernel is an invalid image
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1281685928 -3600 # Node ID 645b7bb8c78adb0677c7a6d810d5ca7c90a61e08 # Parent 708cbcb3a8f53d9cf1537fa95b8f4150ace51213 xc: fix segfault in pv domain create if kernel is an invalid image If libelf calls elf_err() or elf_msg() before elf_set_log() has been called then it could potentially read an uninitialised log handling callback function pointer from struct elf_binary. Fix this in libxc by zeroing the structure before calling elf_init(). Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> xen-unstable changeset: 1d67dd785ef4 xen-unstable date: Mon Aug 09 17:43:18 2010 +0100 --- tools/libxc/xc_hvm_build.c | 1 + 1 files changed, 1 insertion(+) diff -r 708cbcb3a8f5 -r 645b7bb8c78a tools/libxc/xc_hvm_build.c --- a/tools/libxc/xc_hvm_build.c Fri Aug 13 08:48:28 2010 +0100 +++ b/tools/libxc/xc_hvm_build.c Fri Aug 13 08:52:08 2010 +0100 @@ -127,6 +127,7 @@ static int setup_guest(int xc_handle, if ( memsize > target ) pod_mode = 1; + memset(&elf, 0, sizeof(elf)); if ( elf_init(&elf, image, image_size) != 0 ) goto error_out; elf_parse_binary(&elf); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |