diff options
-rw-r--r-- | fs/binfmt_elf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 1b117a441298..c2eac2a50bd2 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -938,6 +938,11 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
938 | kfree(elf_interpreter); | 938 | kfree(elf_interpreter); |
939 | } else { | 939 | } else { |
940 | elf_entry = loc->elf_ex.e_entry; | 940 | elf_entry = loc->elf_ex.e_entry; |
941 | if (BAD_ADDR(elf_entry)) { | ||
942 | send_sig(SIGSEGV, current, 0); | ||
943 | retval = -ENOEXEC; /* Nobody gets to see this, but.. */ | ||
944 | goto out_free_dentry; | ||
945 | } | ||
941 | } | 946 | } |
942 | 947 | ||
943 | kfree(elf_phdata); | 948 | kfree(elf_phdata); |