Commit 901e02c2 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

FROMLIST: exec: Restore EACCES of S_ISDIR execve()

The return code for attempting to execute a directory has always been
EACCES. Adjust the S_ISDIR exec test to reflect the old errno instead
of the general EISDIR for other kinds of "open" attempts on directories.

Link: https://lore.kernel.org/lkml/20200813151305.6191993b@why
Link: https://lore.kernel.org/r/20200813231723.2725102-2-keescook@chromium.org


Fixes: 633fb6ac ("exec: move S_ISREG() check earlier")
Reported-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Idb68cdfc90be5928691ac68dda8c98726af20c9e
parent af494fd9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment