mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] x86_64: Check for bad elf entry address.
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 <[email protected]> Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f83f2b5fba
commit
5342fba541
1 changed files with 5 additions and 0 deletions
|
|
@ -938,6 +938,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue