Module Name: src
Committed By: maxv
Date: Thu Jul 11 17:07:10 UTC 2019
Modified Files:
src/sys/uvm: uvm_map.c
Log Message:
Fix info leak: 'map_attrib' is not used in UVM, and contains uninitialized
heap garbage. Return zero. Maybe we should remove the field completely.
To generate a diff of this commit:
cvs rdiff -u -r1.360 -r1.361 src/sys/uvm/uvm_map.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.360 src/sys/uvm/uvm_map.c:1.361
--- src/sys/uvm/uvm_map.c:1.360 Sat Jun 8 23:48:33 2019
+++ src/sys/uvm/uvm_map.c Thu Jul 11 17:07:10 2019
@@ -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 @@ fill_vmentry(struct lwp *l, struct proc
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) | \