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/c9828372e7c4
branches: trunk
changeset: 453701:c9828372e7c4
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Aug 23 07:53:36 2019 +0000
description:
Fix info leaks.
diffstat:
sys/compat/linux/common/linux_file64.c | 5 +++--
sys/compat/linux/common/linux_misc.c | 5 +++--
sys/compat/linux32/common/linux32_dirent.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diffs (78 lines):
diff -r 727168e79a2b -r c9828372e7c4 sys/compat/linux/common/linux_file64.c
--- a/sys/compat/linux/common/linux_file64.c Fri Aug 23 07:29:29 2019 +0000
+++ b/sys/compat/linux/common/linux_file64.c Fri Aug 23 07:53:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file64.c,v 1.61 2019/08/23 06:54:54 maxv Exp $ */
+/* $NetBSD: linux_file64.c,v 1.62 2019/08/23 07:53:36 maxv Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.61 2019/08/23 06:54:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.62 2019/08/23 07:53:36 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -353,6 +353,7 @@
* we have to worry about touching user memory outside of
* the copyout() call).
*/
+ memset(&idb, 0, sizeof(idb));
idb.d_ino = bdp->d_fileno;
idb.d_type = bdp->d_type;
idb.d_off = off;
diff -r 727168e79a2b -r c9828372e7c4 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Fri Aug 23 07:29:29 2019 +0000
+++ b/sys/compat/linux/common/linux_misc.c Fri Aug 23 07:53:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.241 2019/08/23 06:47:58 maxv Exp $ */
+/* $NetBSD: linux_misc.c,v 1.242 2019/08/23 07:53:36 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.241 2019/08/23 06:47:58 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.242 2019/08/23 07:53:36 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -772,6 +772,7 @@
* we have to worry about touching user memory outside of
* the copyout() call).
*/
+ memset(&idb, 0, sizeof(idb));
idb.d_ino = bdp->d_fileno;
/*
* The old readdir() call misuses the offset and reclen fields.
diff -r 727168e79a2b -r c9828372e7c4 sys/compat/linux32/common/linux32_dirent.c
--- a/sys/compat/linux32/common/linux32_dirent.c Fri Aug 23 07:29:29 2019 +0000
+++ b/sys/compat/linux32/common/linux32_dirent.c Fri Aug 23 07:53:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_dirent.c,v 1.19 2018/09/03 16:29:29 riastradh Exp $ */
+/* $NetBSD: linux32_dirent.c,v 1.20 2019/08/23 07:53:36 maxv Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.19 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.20 2019/08/23 07:53:36 maxv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -201,6 +201,7 @@
* we have to worry about touching user memory outside of
* the copyout() call).
*/
+ memset(&idb, 0, sizeof(idb));
idb.d_ino = bdp->d_fileno;
/*
* The old readdir() call misuses the offset and reclen fields.
Home |
Main Index |
Thread Index |
Old Index