Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix kernel info leak.



details:   https://anonhg.NetBSD.org/src/rev/796039abb484
branches:  trunk
changeset: 446237:796039abb484
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Nov 28 15:10:40 2018 +0000

description:
Fix kernel info leak.

        + Possible info leak: [len=32, leaked=16]
        | #0 0xffffffff80baf3a7 in kleak_copyout
        | #1 0xffffffff80b940f8 in sys___timer_settime50
        | #2 0xffffffff80259c42 in syscall

diffstat:

 sys/kern/kern_time.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 73e0e85481cf -r 796039abb484 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Wed Nov 28 11:50:48 2018 +0000
+++ b/sys/kern/kern_time.c      Wed Nov 28 15:10:40 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.191 2018/11/13 07:16:33 maxv Exp $     */
+/*     $NetBSD: kern_time.c,v 1.192 2018/11/28 15:10:40 maxv Exp $     */
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.191 2018/11/13 07:16:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.192 2018/11/28 15:10:40 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/resourcevar.h>
@@ -603,6 +603,7 @@
                pts = timers_alloc(p);
 
        pt = pool_get(&ptimer_pool, PR_WAITOK);
+       memset(pt, 0, sizeof(*pt));
        if (evp != NULL) {
                if (((error =
                    (*fetch_event)(evp, &pt->pt_ev, sizeof(pt->pt_ev))) != 0) ||



Home | Main Index | Thread Index | Old Index