mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
commit2b1d3ae940upstream. load_elf_binary() returns `retval', not `error'. Fixes:a87938b2e2("fs/binfmt_elf.c: fix bug in loading of PIE binaries") Reported-by: James Hogan <james.hogan@imgtec.com> Cc: Michael Davidson <md@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fe023f735b
commit
f0d445db03
@@ -824,7 +824,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
||||
total_size = total_mapping_size(elf_phdata,
|
||||
loc->elf_ex.e_phnum);
|
||||
if (!total_size) {
|
||||
error = -EINVAL;
|
||||
retval = -EINVAL;
|
||||
goto out_free_dentry;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user