Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/kern Pull up following revision(s) (requested by maxv...
details: https://anonhg.NetBSD.org/src/rev/8b806bfdd646
branches: netbsd-8
changeset: 745228:8b806bfdd646
user: martin <martin%NetBSD.org@localhost>
date: Tue Feb 25 19:12:14 2020 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1509):
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 8fde0fbbf704 -r 8b806bfdd646 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Tue Feb 25 18:52:44 2020 +0000
+++ b/sys/kern/uipc_socket.c Tue Feb 25 19:12:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.255.2.4 2018/11/12 09:43:19 martin Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.255.2.5 2020/02/25 19:12:14 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.255.2.4 2018/11/12 09:43:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.255.2.5 2020/02/25 19:12:14 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2015,6 +2015,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