Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2014 08:33:33 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r270787 - stable/10/sys/kern
Message-ID:  <201408290833.s7T8XX65013499@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Aug 29 08:33:32 2014
New Revision: 270787
URL: http://svnweb.freebsd.org/changeset/base/270787

Log:
  MFC r270320:
  Check the validity of struct sigaction sa_flags value, reject unknown
  flags.

Modified:
  stable/10/sys/kern/kern_sig.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_sig.c
==============================================================================
--- stable/10/sys/kern/kern_sig.c	Fri Aug 29 08:20:03 2014	(r270786)
+++ stable/10/sys/kern/kern_sig.c	Fri Aug 29 08:33:32 2014	(r270787)
@@ -644,6 +644,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408290833.s7T8XX65013499>