Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat Fix info leaks.
details: https://anonhg.NetBSD.org/src/rev/77f535a7320d
branches: trunk
changeset: 453694:77f535a7320d
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Aug 23 06:47:58 2019 +0000
description:
Fix info leaks.
diffstat:
sys/compat/linux/common/linux_misc.c | 5 +++--
sys/compat/linux32/common/linux32_utsname.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (68 lines):
diff -r 214304499f86 -r 77f535a7320d sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Fri Aug 23 06:39:54 2019 +0000
+++ b/sys/compat/linux/common/linux_misc.c Fri Aug 23 06:47:58 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.240 2018/09/03 16:29:29 riastradh Exp $ */
+/* $NetBSD: linux_misc.c,v 1.241 2019/08/23 06:47:58 maxv Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.240 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.241 2019/08/23 06:47:58 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -351,6 +351,7 @@
} */
struct linux_utsname luts;
+ memset(&luts, 0, sizeof(luts));
strlcpy(luts.l_sysname, linux_sysname, sizeof(luts.l_sysname));
strlcpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
strlcpy(luts.l_release, linux_release, sizeof(luts.l_release));
diff -r 214304499f86 -r 77f535a7320d sys/compat/linux32/common/linux32_utsname.c
--- a/sys/compat/linux32/common/linux32_utsname.c Fri Aug 23 06:39:54 2019 +0000
+++ b/sys/compat/linux32/common/linux32_utsname.c Fri Aug 23 06:47:58 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_utsname.c,v 1.9 2008/11/19 18:36:04 ad Exp $ */
+/* $NetBSD: linux32_utsname.c,v 1.10 2019/08/23 06:47:58 maxv Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_utsname.c,v 1.9 2008/11/19 18:36:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_utsname.c,v 1.10 2019/08/23 06:47:58 maxv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -81,6 +81,7 @@
struct linux_utsname luts;
struct linux_utsname *lp;
+ memset(&luts, 0, sizeof(luts));
strlcpy(luts.l_sysname, linux32_sysname, sizeof(luts.l_sysname));
strlcpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
strlcpy(luts.l_release, linux32_release, sizeof(luts.l_release));
@@ -101,6 +102,7 @@
} */
struct linux_oldutsname luts;
+ memset(&luts, 0, sizeof(luts));
strlcpy(luts.l_sysname, linux32_sysname, sizeof(luts.l_sysname));
strlcpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
strlcpy(luts.l_release, linux32_release, sizeof(luts.l_release));
@@ -118,6 +120,7 @@
} */
struct linux_oldoldutsname luts;
+ memset(&luts, 0, sizeof(luts));
strlcpy(luts.l_sysname, linux32_sysname, sizeof(luts.l_sysname));
strlcpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
strlcpy(luts.l_release, linux32_release, sizeof(luts.l_release));
Home |
Main Index |
Thread Index |
Old Index