Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/compat/common Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/c77ab2e9daab
branches:  netbsd-8
changeset: 376552:c77ab2e9daab
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Jun 21 21:13:27 2023 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1838):

        sys/compat/common/kern_time_50.c: revision 1.32

Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure.

>From Thomas Barabosch of Fraunhofer FKIE.

diffstat:

 sys/compat/common/kern_time_50.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9f62e6d2e743 -r c77ab2e9daab sys/compat/common/kern_time_50.c
--- a/sys/compat/common/kern_time_50.c  Wed Jun 21 21:09:28 2023 +0000
+++ b/sys/compat/common/kern_time_50.c  Wed Jun 21 21:13:27 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time_50.c,v 1.31.10.1 2023/06/21 21:04:01 martin Exp $    */
+/*     $NetBSD: kern_time_50.c,v 1.31.10.2 2023/06/21 21:13:27 martin 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.10.1 2023/06/21 21:04:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31.10.2 2023/06/21 21:13:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -528,6 +528,7 @@ compat_50_sys___ntp_gettime30(struct lwp
 
        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