Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-1]: src/sys/kern Pull up following revision(s) (requested by ma...



details:   https://anonhg.NetBSD.org/src/rev/a5c6846df0c4
branches:  netbsd-7-1
changeset: 450497:a5c6846df0c4
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Apr 16 03:53:46 2019 +0000

description:
Pull up following revision(s) (requested by martin in ticket #1688):
        sys/kern/sys_mqueue.c: revision 1.44
mq_send1: fix argument validation and reject too large lengths early.
Discovered by Andy Nguyen.

diffstat:

 sys/kern/sys_mqueue.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 0257d4e9064b -r a5c6846df0c4 sys/kern/sys_mqueue.c
--- a/sys/kern/sys_mqueue.c     Wed Mar 13 12:35:45 2019 +0000
+++ b/sys/kern/sys_mqueue.c     Tue Apr 16 03:53:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_mqueue.c,v 1.36 2014/02/25 18:30:11 pooka Exp $    */
+/*     $NetBSD: sys_mqueue.c,v 1.36.10.1 2019/04/16 03:53:46 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2007-2011 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.36 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.36.10.1 2019/04/16 03:53:46 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -794,6 +794,8 @@
                return EINVAL;
 
        /* Allocate a new message */
+       if (msg_len > mq_max_msgsize)
+               return EMSGSIZE;
        size = sizeof(struct mq_msg) + msg_len;
        if (size > mq_max_msgsize)
                return EMSGSIZE;



Home | Main Index | Thread Index | Old Index