diff options
author | Kees Cook <[email protected]> | 2020-08-14 17:30:14 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-08-14 19:56:56 -0700 |
commit | fc4177be963dccad73b98d7db3a8a38911f952b7 (patch) | |
tree | 35f22c3412b574af52a9279684b6a5e8f6d6dd4e /lib/test_overflow.c | |
parent | b1a3e75e466d96383508634f3d2e477ac45f2fc1 (diff) |
exec: restore EACCES of S_ISDIR execve()
Patch series "Fix S_ISDIR execve() errno".
Fix an errno change for execve() of directories, noticed by Marc Zyngier.
Along with the fix, include a regression test to avoid seeing this return
in the future.
This patch (of 2):
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.
Fixes: 633fb6ac3980 ("exec: move S_ISREG() check earlier")
Reported-by: Marc Zyngier <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/lkml/20200813151305.6191993b@why
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions