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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to