diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-11 22:30:57 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-11 22:32:59 +0100 |
commit | f03800cee39c5cbe06c2b68aeb9c9cd558231c3b (patch) | |
tree | 5c5625b83840f3f03677056a1d8a231f501a4e84 /Kernel/Syscalls/ptrace.cpp | |
parent | 127ce32d9e235622b708f5a7a7be9fc57bef2c39 (diff) | |
download | serenity-f03800cee39c5cbe06c2b68aeb9c9cd558231c3b.zip |
Kernel: Add dedicated "ptrace" pledge promise
The vast majority of programs don't ever need to use sys$ptrace(),
and it seems like a high-value system call to prevent a compromised
process from using.
This patch moves sys$ptrace() from the "proc" promise to its own,
new "ptrace" promise and updates the affected apps.
Diffstat (limited to 'Kernel/Syscalls/ptrace.cpp')
-rw-r--r-- | Kernel/Syscalls/ptrace.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index 71963d80f9..a4b82edfaa 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -37,7 +37,7 @@ namespace Kernel { int Process::sys$ptrace(Userspace<const Syscall::SC_ptrace_params*> user_params) { - REQUIRE_PROMISE(proc); + REQUIRE_PROMISE(ptrace); Syscall::SC_ptrace_params params; if (!copy_from_user(¶ms, user_params)) return -EFAULT; |