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:
Konstantin Belousov 2014-08-22 07:52:47 +00:00
parent ed063112f4
commit 2d86417410
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270320

View file

@ -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;