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

            Bug ID: 507853
           Summary: faccessat and faccessat2 should handle AT_FDCWD,
                    AT_EMPTY_PATH and absolute paths
    Classification: Developer tools
           Product: valgrind
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

commit bc66a6e865d952ac51ffb0e63c127ce7cd977b98
Add fd_allowed and POST_newFd_RES to all syscalls that use or return fds
https://bugs.kde.org/show_bug.cgi?id=493430

Introduced the following fd_allowed checks for PRE(sys_faccessat):

+   if ( !ML_(fd_allowed)(SARG1, "faccessat", tid, False) )
+     SET_STATUS_Failure( VKI_EBADF );

and PRE(sys_faccessat2):

+   if ( !ML_(fd_allowed)(SARG1, "faccessat2", tid, False) )
+     SET_STATUS_Failure( VKI_EBADF );

These are good checks, but too simplistic. They don't handle the special cases
for AT_FDCWD as dfd, AT_EMPTY_PATH as flag or absolute paths.

This is why LTP testcases faccessat01 and faccessat201 currently fail.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to