Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/uvm Pull up following revision(s) (requested by pgoye...



details:   https://anonhg.NetBSD.org/src/rev/0b15042b0dd7
branches:  netbsd-8
changeset: 434323:0b15042b0dd7
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Oct 01 10:20:03 2017 +0000

description:
Pull up following revision(s) (requested by pgoyette in ticket #294):
        sys/uvm/uvm_map.c: revision 1.352
Fix user-triggerable kernel crash as reported in PR kern/52573 (from
Bruno Haible).

diffstat:

 sys/uvm/uvm_map.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 7a92a72311e6 -r 0b15042b0dd7 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Thu Sep 28 01:19:22 2017 +0000
+++ b/sys/uvm/uvm_map.c Sun Oct 01 10:20:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.351 2017/05/30 17:09:17 chs Exp $        */
+/*     $NetBSD: uvm_map.c,v 1.351.2.1 2017/10/01 10:20:03 martin Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351 2017/05/30 17:09:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351.2.1 2017/10/01 10:20:03 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -4991,7 +4991,7 @@
                vme = kmem_alloc(vmesize, KM_SLEEP);
        for (entry = map->header.next; entry != &map->header;
            entry = entry->next) {
-               if (oldp && (dp - (char *)oldp) < *oldlenp) {
+               if (oldp && (dp - (char *)oldp) < vmesize) {
                        error = fill_vmentry(l, p, &vme[count], map, entry);
                        if (error)
                                goto out;
@@ -5009,7 +5009,7 @@
                const u_int esize = min(sizeof(*vme), elem_size);
                dp = oldp;
                for (size_t i = 0; i < count; i++) {
-                       if (oldp && (dp - (char *)oldp) < *oldlenp) {
+                       if (oldp && (dp - (char *)oldp) < vmesize) {
                                error = sysctl_copyout(l, &vme[i], dp, esize);
                                if (error)
                                        break;



Home | Main Index | Thread Index | Old Index