All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix null pointer dereference in xen_guest_lookup()
@ 2006-08-26 22:22 Alex Williamson
  2006-08-27  5:57 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2006-08-26 22:22 UTC (permalink / raw)
  To: Keir Fraser, Ian Campbell; +Cc: xen-devel


  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@hp.com>
---

diff -r 2bc5796fbfcc tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c	Sat Aug 26 14:44:47 2006 -0600
+++ b/tools/libxc/xc_load_elf.c	Sat Aug 26 16:13:10 2006 -0600
@@ -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 2bc5796fbfcc xen/common/elf.c
--- a/xen/common/elf.c	Sat Aug 26 14:44:47 2006 -0600
+++ b/xen/common/elf.c	Sat Aug 26 16:13:10 2006 -0600
@@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix null pointer dereference in xen_guest_lookup()
  2006-08-26 22:22 [PATCH] fix null pointer dereference in xen_guest_lookup() Alex Williamson
@ 2006-08-27  5:57 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2006-08-27  5:57 UTC (permalink / raw)
  To: Alex Williamson; +Cc: xen-devel

On Sat, 2006-08-26 at 16:22 -0600, Alex Williamson wrote:
>   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,

Committed, thank you.

Ian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-27  5:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-26 22:22 [PATCH] fix null pointer dereference in xen_guest_lookup() Alex Williamson
2006-08-27  5:57 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.