|
From: Tom H. <th...@cy...> - 2004-09-25 16:14:03
|
CVS commit by thughes:
Improve the checks in PRE(execve) to check that the file being executed
is a regular file and fail with EINVAL if it is not.
This problem was highlight by bug 89481 although this doesn't solve the
actual problem reported in that bug.
M +2 -2 vg_syscalls.c 1.144
--- valgrind/coregrind/vg_syscalls.c #1.143:1.144
@@ -1765,8 +1765,8 @@ PRE(execve)
return;
}
- /* just look for any X bit set
+ /* just look for regular file with any X bit set
XXX do proper permissions check?
*/
- if ((st.st_mode & 0111) == 0) {
+ if ((st.st_mode & 0100111) == 0100000) {
res = -VKI_EACCES;
return;
|