From 02c00a87dde59cd89f6d7be1db22ed068ae50e0c Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 16 Oct 2025 16:52:08 +0200 Subject: [PATCH] LinuxSyscalls: Track MappedResources only for regular files that are executable --- .../Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp index 2d70b81f7..6ba8d27da 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp @@ -394,7 +394,8 @@ std::optional SyscallHandler: Resource->Iterator = Iter; } - if (PathLength != -1) { + // Only handle FDs that are backed by regular files that are executable + if (PathLength != -1 && S_ISREG(buf.st_mode) && (buf.st_mode & S_IXUSR)) { if (Inserted) { Resource->MappedFile = fextl::make_unique(); Resource->MappedFile->Filename = fextl::string(Tmp, PathLength);