Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/common Zero ntptimeval50 too to prevent 4-byte ke...
details: https://anonhg.NetBSD.org/src/rev/61530e5bd388
branches: trunk
changeset: 445474:61530e5bd388
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Oct 30 14:35:16 2018 +0000
description:
Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure.
>From Thomas Barabosch of Fraunhofer FKIE.
XXX pullup-7, pullup-8 (along with rev. 1.60 of kern_ntptime.c)
diffstat:
sys/compat/common/kern_time_50.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 71ead5557ddf -r 61530e5bd388 sys/compat/common/kern_time_50.c
--- a/sys/compat/common/kern_time_50.c Tue Oct 30 10:38:11 2018 +0000
+++ b/sys/compat/common/kern_time_50.c Tue Oct 30 14:35:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $ */
+/* $NetBSD: kern_time_50.c,v 1.32 2018/10/30 14:35:16 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.32 2018/10/30 14:35:16 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_aio.h"
@@ -526,6 +526,7 @@
if (SCARG(uap, ntvp)) {
ntp_gettime(&ntv);
+ memset(&ntv50, 0, sizeof(ntv50));
timespec_to_timespec50(&ntv.time, &ntv50.time);
ntv50.maxerror = ntv.maxerror;
ntv50.esterror = ntv.esterror;
Home |
Main Index |
Thread Index |
Old Index