From a058649c9336f53a25f224e13eab1f8b49dd5363 Mon Sep 17 00:00:00 2001 From: hw_llm Date: Fri, 23 Aug 2024 10:27:18 +0800 Subject: [PATCH] =?UTF-8?q?Description:=20syscall=20SysExecve=20=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=BC=8F=E6=B4=9E=E4=BF=AE=E5=A4=8D=20IssueNo:=20http?= =?UTF-8?q?s://gitee.com/openharmony/kernel=5Fliteos=5Fa/issues/IALXZ5=20F?= =?UTF-8?q?eature=20Or=20Bugfix:=20Bugfix=20Binary=20Source:=20No=20Signed?= =?UTF-8?q?-off-by:=20hw=5Fllm=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- syscall/fs_syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syscall/fs_syscall.c b/syscall/fs_syscall.c index eec9b5b4..d680cb22 100644 --- a/syscall/fs_syscall.c +++ b/syscall/fs_syscall.c @@ -641,6 +641,9 @@ OUT: #ifdef LOSCFG_KERNEL_DYNLOAD int SysExecve(const char *fileName, char *const *argv, char *const *envp) { + if (!LOS_IsUserAddress((vaddr_t)(UINTPTR)fileName)) { + return -EFAULT; + } return LOS_DoExecveFile(fileName, argv, envp); } #endif