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-changelog

[Xen-changelog] fix buffer overflow in print XS_DEBUG command

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] fix buffer overflow in print XS_DEBUG command
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Mar 2006 18:50:12 +0000
Delivery-date: Wed, 15 Mar 2006 18:52:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 250ff103c291efeccc4b0ccbf36d228d09712e43
# Parent  51b0d4c2d4d9e2a4ad02c0e3b32fb56f6a8b8126
fix buffer overflow in print XS_DEBUG command

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 51b0d4c2d4d9 -r 250ff103c291 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Wed Mar 15 12:08:10 2006
+++ b/tools/xenstore/xenstored_core.c   Wed Mar 15 12:24:34 2006
@@ -1115,8 +1115,17 @@
 
 static void do_debug(struct connection *conn, struct buffered_data *in)
 {
-       if (streq(in->buffer, "print"))
+       int num;
+
+       num = xs_count_strings(in->buffer, in->used);
+
+       if (streq(in->buffer, "print")) {
+               if (num < 2) {
+                       send_error(conn, EINVAL);
+                       return;
+               }
                xprintf("debug: %s", in->buffer + get_string(in, 0));
+       }
        if (streq(in->buffer, "check"))
                check_store();
 #ifdef TESTING

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] fix buffer overflow in print XS_DEBUG command, Xen patchbot -unstable <=