From 7613f71848a903e578c207d2bc84e762f258042f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 26 Aug 2025 13:13:49 +0200 Subject: [PATCH] Linux syscall: copy and paste error in openat2 fd_allowed check --- coregrind/m_syswrap/syswrap-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 984acaefe..ff87ddf71 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -14175,7 +14175,7 @@ PRE(sys_openat2) if (ML_(safe_to_deref)( (void*)(Addr)ARG2, 1 ) && *(Char *)(Addr)ARG2 != '/' && ((Int)ARG1) != ((Int)VKI_AT_FDCWD) - && !ML_(fd_allowed)(ARG1, "openat", tid, False)) + && !ML_(fd_allowed)(ARG1, "openat2", tid, False)) SET_STATUS_Failure( VKI_EBADF ); /* Handle the case where the open is of /proc/self/cmdline or /proc//cmdline, and just give it a copy of the fd for the -- 2.47.3