mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel: sigpending() and sigprocmask() should validate memory writes.
This commit is contained in:
parent
19acb2baf7
commit
8b64f213a1
1 changed files with 2 additions and 2 deletions
|
@ -1820,7 +1820,7 @@ int Process::sys$dup2(int old_fd, int new_fd)
|
|||
int Process::sys$sigprocmask(int how, const sigset_t* set, sigset_t* old_set)
|
||||
{
|
||||
if (old_set) {
|
||||
if (!validate_read_typed(old_set))
|
||||
if (!validate_write_typed(old_set))
|
||||
return -EFAULT;
|
||||
*old_set = m_signal_mask;
|
||||
}
|
||||
|
@ -1846,7 +1846,7 @@ int Process::sys$sigprocmask(int how, const sigset_t* set, sigset_t* old_set)
|
|||
|
||||
int Process::sys$sigpending(sigset_t* set)
|
||||
{
|
||||
if (!validate_read_typed(set))
|
||||
if (!validate_write_typed(set))
|
||||
return -EFAULT;
|
||||
*set = m_pending_signals;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue