Commit f9c0a39d authored by Kees Cook's avatar Kees Cook
Browse files

binfmt_elf: Only report padzero() errors when PROT_WRITE



Errors with padzero() should be caught unless we're expecting a
pathological (non-writable) segment. Report -EFAULT only when PROT_WRITE
is present.

Additionally add some more documentation to padzero(), elf_map(), and
elf_load().

Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
Suggested-by: default avatarEric Biederman <ebiederm@xmission.com>
Tested-by: default avatarPedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: default avatarSebastian Ott <sebott@redhat.com>
Link: https://lore.kernel.org/r/20230929032435.2391507-5-keescook@chromium.org


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent d5ca24f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment