]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Fix execveat() with AT_FDCWD and relative path, add more checks
authorMartin Cermak <mcermak@redhat.com>
Fri, 1 Aug 2025 13:35:04 +0000 (15:35 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 2 Aug 2025 00:21:28 +0000 (02:21 +0200)
commita2c294b3b19ef4af391014e7b3cbc5ec75b2bd68
treeca83b316cb5853fe2f44671bf9874d06775d5011
parent34dff50cf304d1d4f0d5a1ad3f55f8b3d85ae701
Fix execveat() with AT_FDCWD and relative path, add more checks

This update does address two closely related problems:

1) In case execveat() is called with a special file descriptor value
of AT_FDCWD (-100), it should accept this special value, and
interpret the provided pathname as relative to the current working
directory of the calling process (like execve(2)) instead of
failing with EBADF, as it does without this patch.

Covered by LTP testcase execveat01.

https://bugs.kde.org/show_bug.cgi?id=506806

2) Add checks preventing execveat() of symlinked programs in case
AT_SYMLINK_NOFOLLOW was specified.

Add checks preventing execveat() from passing in case invalid
flag was specified.

Covered by LTP testcase execveat02.

https://bugs.kde.org/show_bug.cgi?id=506813
NEWS
coregrind/m_syswrap/syswrap-linux.c