Source-Changes-HG archive

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

[src/netbsd-7-1]: src/sys/kern Pull up following revision(s) (requested by ma...



details:   https://anonhg.NetBSD.org/src/rev/80867fb6e082
branches:  netbsd-7-1
changeset: 800957:80867fb6e082
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jan 24 14:13:26 2019 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1675):

        sys/kern/kern_ntptime.c: revision 1.60

Zero out the ntptimeval structure to prevent a 4 byte kernel stack disclosure.
Reported by Thomas Barabosch.

diffstat:

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

diffs (26 lines):

diff -r 370f46b358b6 -r 80867fb6e082 sys/kern/kern_ntptime.c
--- a/sys/kern/kern_ntptime.c   Thu Jan 24 14:08:46 2019 +0000
+++ b/sys/kern/kern_ntptime.c   Thu Jan 24 14:13:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $  */
+/*     $NetBSD: kern_ntptime.c,v 1.55.12.1 2019/01/24 14:13:26 martin Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("$FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $"); */
-__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.55.12.1 2019/01/24 14:13:26 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
@@ -239,6 +239,7 @@
 void
 ntp_gettime(struct ntptimeval *ntv)
 {
+       memset(ntv, 0, sizeof(*ntv));
 
        mutex_spin_enter(&timecounter_lock);
        nanotime(&ntv->time);



Home | Main Index | Thread Index | Old Index