Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Fix info leak: 'map_attrib' is not used in UVM, and ...



details:   https://anonhg.NetBSD.org/src/rev/a1b4230baede
branches:  trunk
changeset: 457671:a1b4230baede
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jul 11 17:07:10 2019 +0000

description:
Fix info leak: 'map_attrib' is not used in UVM, and contains uninitialized
heap garbage. Return zero. Maybe we should remove the field completely.

diffstat:

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

diffs (27 lines):

diff -r aad35fc55528 -r a1b4230baede sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Thu Jul 11 16:59:14 2019 +0000
+++ b/sys/uvm/uvm_map.c Thu Jul 11 17:07:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.360 2019/06/08 23:48:33 chs Exp $        */
+/*     $NetBSD: uvm_map.c,v 1.361 2019/07/11 17:07:10 maxv 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.360 2019/06/08 23:48:33 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.361 2019/07/11 17:07:10 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -4946,7 +4946,7 @@
        kve->kve_offset = e->offset;
        kve->kve_wired_count = e->wired_count;
        kve->kve_inheritance = e->inheritance;
-       kve->kve_attributes = e->map_attrib;
+       kve->kve_attributes = 0; /* e->map_attrib */
        kve->kve_advice = e->advice;
 #define PROT(p) (((p) & VM_PROT_READ) ? KVME_PROT_READ : 0) | \
        (((p) & VM_PROT_WRITE) ? KVME_PROT_WRITE : 0) | \



Home | Main Index | Thread Index | Old Index