From 13027b90db6de8772625e9279e8fa71df007fb08 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Fri, 4 Jul 2025 09:49:59 +0200 Subject: [PATCH] [SYCL] Specify application name for CreateProcess `CreateProcess` has a really weird method [1] of inferring an executable name using space as a separator which poses a potential security risk of someone injecting a 3rd-party executable to be launched instead of the original one. [1]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw#security-remarks --- sycl/tools/sycl-ls/sycl-ls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/tools/sycl-ls/sycl-ls.cpp b/sycl/tools/sycl-ls/sycl-ls.cpp index 32de5b3e6d213..4c6ddd14480f5 100644 --- a/sycl/tools/sycl-ls/sycl-ls.cpp +++ b/sycl/tools/sycl-ls/sycl-ls.cpp @@ -308,7 +308,7 @@ static int unsetFilterEnvVarsAndFork() { si.dwFlags |= STARTF_USESTDHANDLES; PROCESS_INFORMATION pi; - if (!CreateProcess(NULL, /* Applicatioon name. */ + if (!CreateProcess(L"sycl-ls.exe", /* Application name. */ GetCommandLine(), /* Current process's CLI input. */ NULL, /* Inherit security attributes. */ NULL, /* Thread security attributes. */