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

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;