Skip to content

Commit

Permalink
Kernel: Reject sigaction() with SA_SIGINFO
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alimpfard authored and awesomekling committed Mar 4, 2022
1 parent cf63447 commit 848eaf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kernel/Syscalls/sigaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) };
Expand Down

0 comments on commit 848eaf2

Please sign in to comment.