diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-02-24 22:29:45 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-04 20:07:05 +0100 |
commit | 848eaf2220fb57cc5b9726a9dc298b79ab99b4df (patch) | |
tree | 0b08a78aff847e7fc488d20bfe3c59b90fa1fc0a /Kernel | |
parent | cf63447044f7f26bc955d6dbfceb10eedfbd3112 (diff) | |
download | serenity-848eaf2220fb57cc5b9726a9dc298b79ab99b4df.zip |
Kernel: Reject sigaction() with SA_SIGINFO
We can't handle this, so let sigaction() fail instead of PANIC()'ing
later when we try to dispatch a signal with SA_SIGINFO set.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/sigaction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Syscalls/sigaction.cpp b/Kernel/Syscalls/sigaction.cpp index 80e14c44a8..e9b5c4c99e 100644 --- a/Kernel/Syscalls/sigaction.cpp +++ b/Kernel/Syscalls/sigaction.cpp @@ -68,6 +68,8 @@ ErrorOr<FlatPtr> Process::sys$sigaction(int signum, Userspace<const sigaction*> } if (user_act) { auto act = TRY(copy_typed_from_user(user_act)); + if (act.sa_flags & SA_SIGINFO) + return ENOTSUP; action.mask = act.sa_mask; action.flags = act.sa_flags; action.handler_or_sigaction = VirtualAddress { reinterpret_cast<void*>(act.sa_sigaction) }; |