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:Marc Zyngier <maz@kernel.org> Reviewed-by:
Greg Kroah-Hartman <gregkh@google.com> Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Change-Id: Idb68cdfc90be5928691ac68dda8c98726af20c9e
Loading
Please sign in to comment