From: Chris Wright Date: Mon, 27 Feb 2006 19:56:48 +0000 (-0800) Subject: x86-64 recursive fault fix, fwd from Andi X-Git-Tag: v2.6.15.5~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fbf3e3d02eb012e95049031cfbfa359b6755c4d;p=thirdparty%2Fkernel%2Fstable-queue.git x86-64 recursive fault fix, fwd from Andi --- diff --git a/queue/series b/queue/series index 5726953723a..9da3cb58d4d 100644 --- a/queue/series +++ b/queue/series @@ -30,3 +30,4 @@ skge-speed-setting.patch skge-fix-napi-irq-race.patch skge-genesis-phy-initialization-fix.patch skge-fix-smp-race.patch +x86_64-check-for-bad-elf-entry-address.patch diff --git a/queue/x86_64-check-for-bad-elf-entry-address.patch b/queue/x86_64-check-for-bad-elf-entry-address.patch new file mode 100644 index 00000000000..c096ead4aa0 --- /dev/null +++ b/queue/x86_64-check-for-bad-elf-entry-address.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Sat Feb 25 19:38:01 2006 +Date: Sun, 26 Feb 2006 04:34:00 +0100 +From: Andi Kleen +To: stable@kernel.org +Cc: +Subject: [PATCH] x86_64: Check for bad elf entry address + + +From: Suresh Siddha + +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 +Signed-off-by: Andi Kleen +Signed-off-by: Chris Wright +--- + fs/binfmt_elf.c | 5 +++++ + 1 files changed, 5 insertions(+) + +--- linux-2.6.15.4.orig/fs/binfmt_elf.c ++++ linux-2.6.15.4/fs/binfmt_elf.c +@@ -932,6 +932,11 @@ static int load_elf_binary(struct linux_ + 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);