aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2006-02-26 04:34:00 +0100
committerChris Wright <chrisw@sous-sol.org>2006-03-01 14:36:37 -0800
commit5a62d3406ddd87a26d706d0b3019f4a1872713da (patch)
tree81d25bcba4c0446ec6dd16003c477d2db8a4c272
parent94069fb3035f4e9de4ce33f5910be0dded06677c (diff)
[PATCH] x86_64: Check for bad elf entry address (CVE-2006-0741)
Fixes a local DOS on Intel systems that lead to an endless recursive fault. AMD machines don't seem to be affected. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r--fs/binfmt_elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index f36f2210204f..02b7298453e4 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -932,6 +932,11 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
kfree(elf_interpreter);
} else {
elf_entry = loc->elf_ex.e_entry;
+ if (BAD_ADDR(elf_entry)) {
+ send_sig(SIGSEGV, current, 0);
+ retval = -ENOEXEC; /* Nobody gets to see this, but.. */
+ goto out_free_dentry;
+ }
}
kfree(elf_phdata);