mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 05:43:59 +00:00
Check the validity of struct sigaction sa_flags value, reject unknown
flags. Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
ed063112f4
commit
2d86417410
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270320
|
@ -639,6 +639,10 @@ kern_sigaction(td, sig, act, oact, flags)
|
|||
|
||||
if (!_SIG_VALID(sig))
|
||||
return (EINVAL);
|
||||
if (act != NULL && (act->sa_flags & ~(SA_ONSTACK | SA_RESTART |
|
||||
SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT |
|
||||
SA_SIGINFO)) != 0)
|
||||
return (EINVAL);
|
||||
|
||||
PROC_LOCK(p);
|
||||
ps = p->p_sigacts;
|
||||
|
|
Loading…
Reference in a new issue