Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/289832db57b1
branches:  netbsd-7
changeset: 447812:289832db57b1
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jan 24 14:14:13 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 3fbf00ce688a -r 289832db57b1 sys/kern/kern_ntptime.c
--- a/sys/kern/kern_ntptime.c   Thu Jan 24 14:08:14 2019 +0000
+++ b/sys/kern/kern_ntptime.c   Thu Jan 24 14:14:13 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.4.1 2019/01/24 14:14:13 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.4.1 2019/01/24 14:14:13 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