From: Alex Williamson <alex.williamson@hp.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
Ian Campbell <Ian.Campbell@XenSource.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] fix null pointer dereference in xen_guest_lookup()
Date: Sat, 26 Aug 2006 16:22:26 -0600 [thread overview]
Message-ID: <1156630946.8431.8.camel@lappy> (raw)
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;
next reply other threads:[~2006-08-26 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-26 22:22 Alex Williamson [this message]
2006-08-27 5:57 ` [PATCH] fix null pointer dereference in xen_guest_lookup() Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1156630946.8431.8.camel@lappy \
--to=alex.williamson@hp.com \
--cc=Ian.Campbell@XenSource.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.