WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]: xc: fix segfault in pv domain create if kernel

To: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: xc: fix segfault in pv domain create if kernel is an invalid image
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 9 Aug 2010 17:38:25 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 09 Aug 2010 09:39:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1281369896.18490.268.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1281369896.18490.268.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 9 Aug 2010, Gianni Tedesco wrote:
> 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>
> 
> diff -r ac93a1ec290c tools/libxc/xc_hvm_build.c
> --- a/tools/libxc/xc_hvm_build.c      Mon Aug 09 16:10:41 2010 +0100
> +++ b/tools/libxc/xc_hvm_build.c      Mon Aug 09 17:04:28 2010 +0100
> @@ -141,6 +141,7 @@ static int setup_guest(xc_interface *xch
>      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);
> 

applied, thanks

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>