Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/f8b952183521
branches:  netbsd-9
changeset: 745224:f8b952183521
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 25 19:10:51 2020 +0000

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

        sys/kern/uipc_socket.c: revision 1.288

Zero out 'tv', to prevent uninitialized bytes in its padding from leaking
to userland. Found by kMSan.

diffstat:

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

diffs (26 lines):

diff -r a3af3ce7251d -r f8b952183521 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Tue Feb 25 19:00:00 2020 +0000
+++ b/sys/kern/uipc_socket.c    Tue Feb 25 19:10:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.281.2.1 2019/10/21 20:06:17 martin Exp $     */
+/*     $NetBSD: uipc_socket.c,v 1.281.2.2 2020/02/25 19:10:51 martin Exp $     */
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.281.2.1 2019/10/21 20:06:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.281.2.2 2020/02/25 19:10:51 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1990,6 +1990,7 @@
                optval = (opt == SO_SNDTIMEO ?
                     so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
 
+               memset(&tv, 0, sizeof(tv));
                tv.tv_sec = optval / hz;
                tv.tv_usec = (optval % hz) * tick;
 



Home | Main Index | Thread Index | Old Index