Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2017 20:01:59 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314314 - head/sys/compat/linux
Message-ID:  <201702262001.v1QK1xOB079683@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun Feb 26 20:01:58 2017
New Revision: 314314
URL: https://svnweb.freebsd.org/changeset/base/314314

Log:
  Return EINVAL in case when an invalid size of signal mask specified.
  
  MFC after:	1 month

Modified:
  head/sys/compat/linux/linux_event.c

Modified: head/sys/compat/linux/linux_event.c
==============================================================================
--- head/sys/compat/linux/linux_event.c	Sun Feb 26 19:59:28 2017	(r314313)
+++ head/sys/compat/linux/linux_event.c	Sun Feb 26 20:01:58 2017	(r314314)
@@ -622,6 +622,8 @@ linux_epoll_pwait(struct thread *td, str
 	int error;
 
 	if (args->mask != NULL) {
+		if (args->sigsetsize != sizeof(l_sigset_t))
+			return (EINVAL);
 		error = copyin(args->mask, &lmask, sizeof(l_sigset_t));
 		if (error != 0)
 			return (error);



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