Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/procfs Fix info leaks.



details:   https://anonhg.NetBSD.org/src/rev/d5824eff4578
branches:  trunk
changeset: 453717:d5824eff4578
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Aug 23 14:12:39 2019 +0000

description:
Fix info leaks.

diffstat:

 sys/miscfs/procfs/procfs_linux.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 6f2b87e1b126 -r d5824eff4578 sys/miscfs/procfs/procfs_linux.c
--- a/sys/miscfs/procfs/procfs_linux.c  Fri Aug 23 13:59:45 2019 +0000
+++ b/sys/miscfs/procfs/procfs_linux.c  Fri Aug 23 14:12:39 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: procfs_linux.c,v 1.74 2018/12/05 18:16:51 christos Exp $      */
+/*      $NetBSD: procfs_linux.c,v 1.75 2019/08/23 14:12:39 maxv Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.74 2018/12/05 18:16:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.75 2019/08/23 14:12:39 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -383,6 +383,7 @@
        mutex_enter(p->p_lock);
 
        /* retrieve RSS size */
+       memset(&ki, 0, sizeof(ki));
        fill_kproc2(p, &ki, false, false);
 
        mutex_exit(p->p_lock);
@@ -440,6 +441,7 @@
        mutex_enter(proc_lock);
        mutex_enter(p->p_lock);
 
+       memset(&ki, 0, sizeof(ki));
        fill_kproc2(p, &ki, false, false);
        calcru(p, NULL, NULL, NULL, &rt);
 



Home | Main Index | Thread Index | Old Index