summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorJann Horn2019-06-28 21:06:46 +0200
committerLinus Torvalds2019-06-29 10:43:45 +0200
commit867bfa4a5fcee66f2b25639acae718e8b28b25a5 (patch)
tree6640c30287166ed34ef1f3137dcaba98b750011e /README
parentmm/mempolicy.c: fix an incorrect rebind node in mpol_rebind_nodemask (diff)
downloadkernel-qcow2-linux-867bfa4a5fcee66f2b25639acae718e8b28b25a5.tar.gz
kernel-qcow2-linux-867bfa4a5fcee66f2b25639acae718e8b28b25a5.tar.xz
kernel-qcow2-linux-867bfa4a5fcee66f2b25639acae718e8b28b25a5.zip
fs/binfmt_flat.c: make load_flat_shared_library() work
load_flat_shared_library() is broken: It only calls load_flat_file() if prepare_binprm() returns zero, but prepare_binprm() returns the number of bytes read - so this only happens if the file is empty. Instead, call into load_flat_file() if the number of bytes read is non-negative. (Even if the number of bytes is zero - in that case, load_flat_file() will see nullbytes and return a nice -ENOEXEC.) In addition, remove the code related to bprm creds and stop using prepare_binprm() - this code is loading a library, not a main executable, and it only actually uses the members "buf", "file" and "filename" of the linux_binprm struct. Instead, call kernel_read() directly. Link: http://lkml.kernel.org/r/20190524201817.16509-1-jannh@google.com Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses") Signed-off-by: Jann Horn <jannh@google.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Kees Cook <keescook@chromium.org> Cc: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Greg Ungerer <gerg@linux-m68k.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions