mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
Kernel: Introduce "sigaction" pledge
You now have to pledge "sigaction" to change signal handlers/dispositions. This is to prevent malicious code from messing with assertions (and segmentation faults), which are normally expected to instantly terminate the process but can do other things if you change signal disposition for them.
This commit is contained in:
committed by
Andreas Kling
parent
839ae82d66
commit
cddaeb43d3
@@ -2711,7 +2711,7 @@ int Process::sys$sigpending(sigset_t* set)
|
||||
|
||||
int Process::sys$sigaction(int signum, const sigaction* act, sigaction* old_act)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
REQUIRE_PROMISE(sigaction);
|
||||
if (signum < 1 || signum >= 32 || signum == SIGKILL || signum == SIGSTOP)
|
||||
return -EINVAL;
|
||||
if (!validate_read_typed(act))
|
||||
|
||||
Reference in New Issue
Block a user