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] libxl: xl create segfaults

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] libxl: xl create segfaults
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Thu, 23 Sep 2010 16:55:39 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Stefano
Delivery-date: Thu, 23 Sep 2010 08:56:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201009231227.29730.Christoph.Egger@xxxxxxx>
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: <201009231227.29730.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-09-23 at 11:27 +0100, Christoph Egger wrote:
> Hi!
> 
> 'xl create' crashes due to stack corruption.

---8<-------------------------------------------

xl: Fix stack corruption caused by non-terminated call to libxl__xs_writev

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

diff -r 50c1cc209f8f tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Sep 22 18:29:24 2010 +0100
+++ b/tools/libxl/libxl.c       Thu Sep 23 16:54:09 2010 +0100
@@ -1718,7 +1718,7 @@ retry_transaction:
         vm_path = libxl__xs_read(&gc,t,libxl__sprintf(&gc, "%s/vm", 
p->dom_path));
         if (vm_path) {
             /* Now write the vncpassword into it. */
-            pass_stuff = libxl__calloc(&gc, 2, sizeof(char *));
+            pass_stuff = libxl__calloc(&gc, 3, sizeof(char *));
             pass_stuff[0] = "vncpasswd";
             pass_stuff[1] = info->vncpasswd;
             libxl__xs_writev(&gc,t,vm_path,pass_stuff);



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

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