From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Richard Henderson <rth@twiddle.net>,
Richard Henderson <rth@cygnus.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Andrew Morton <akpm@osdl.org>,
Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH] ensure NULL deref can't possibly happen in is_exported()
Date: Sun, 7 May 2006 19:23:12 +0200 [thread overview]
Message-ID: <200605071923.12817.jesper.juhl@gmail.com> (raw)
If CONFIG_KALLSYMS is defined and if it should happen that is_exported()
is given a NULL 'mod' and
lookup_symbol(name, __start___ksymtab, __stop___ksymtab) returns 0, then
we'll end up dereferencing a NULL pointer.
Patch below makes sure that'll never happen.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
kernel/module.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.17-rc3-git12-orig/kernel/module.c 2006-05-07 03:25:38.000000000 +0200
+++ linux-2.6.17-rc3-git12/kernel/module.c 2006-05-07 19:16:38.000000000 +0200
@@ -1326,7 +1326,7 @@ int is_exported(const char *name, const
if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab))
return 1;
else
- if (lookup_symbol(name, mod->syms, mod->syms + mod->num_syms))
+ if (mod && lookup_symbol(name, mod->syms, mod->syms + mod->num_syms))
return 1;
else
return 0;
reply other threads:[~2006-05-07 17:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200605071923.12817.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@cygnus.com \
--cc=rth@twiddle.net \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome