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] [xen-unstable] [PATCH] fix null pointer dereference in x

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [PATCH] fix null pointer dereference in xen_guest_lookup()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Aug 2006 07:10:11 +0000
Delivery-date: Sun, 27 Aug 2006 00:10:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Alex Williamson <alex.williamson@xxxxxx>
# Node ID 5b9ff5e8653aa37d812a26526440fc4976e10b7a
# Parent  1a3b883614b7eac6277d44d6deb1e494341b0f83
[PATCH] fix null pointer dereference in xen_guest_lookup()

  The latest ELF changes have a null pointer dereference bug when you
have neither an elf notes section nor a __xen_guest_string.  This patch
checks for the existence of the __xen_guest_string prior to using it.
Please apply.  Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 tools/libxc/xc_load_elf.c |    3 +++
 xen/common/elf.c          |    3 +++
 2 files changed, 6 insertions(+)

diff -r 1a3b883614b7 -r 5b9ff5e8653a tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Fri Aug 25 22:35:24 2006 +0100
+++ b/tools/libxc/xc_load_elf.c Sun Aug 27 06:56:01 2006 +0100
@@ -93,6 +93,9 @@ static const char *xen_guest_lookup(stru
     const char *fallback;
     const char *p;
 
+    if ( !dsi->__xen_guest_string )
+        return NULL;
+
     if ( type > sizeof(xenguest_fallbacks) )
         return NULL;
 
diff -r 1a3b883614b7 -r 5b9ff5e8653a xen/common/elf.c
--- a/xen/common/elf.c  Fri Aug 25 22:35:24 2006 +0100
+++ b/xen/common/elf.c  Sun Aug 27 06:56:01 2006 +0100
@@ -49,6 +49,9 @@ static const char *xen_guest_lookup(stru
     const char *fallback;
     const char *p;
 
+    if ( !dsi->__xen_guest_string )
+        return NULL;
+
     if ( type > sizeof(xenguest_fallbacks) )
         return NULL;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [PATCH] fix null pointer dereference in xen_guest_lookup(), Xen patchbot-unstable <=