Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 In netbsd32___mount50() zero out the nat...
details: https://anonhg.NetBSD.org/src/rev/9d0841d85178
branches: trunk
changeset: 959513:9d0841d85178
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Feb 16 14:47:20 2021 +0000
description:
In netbsd32___mount50() zero out the native fs_args union before use so
we don't pass stack garbage to the lower layers in the MNT_GETARGS case.
Fixes random errors like "Bad address" from "mount -vv" with nfs mounts.
diffstat:
sys/compat/netbsd32/netbsd32_fs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 6861be4c6bc0 -r 9d0841d85178 sys/compat/netbsd32/netbsd32_fs.c
--- a/sys/compat/netbsd32/netbsd32_fs.c Tue Feb 16 14:44:25 2021 +0000
+++ b/sys/compat/netbsd32/netbsd32_fs.c Tue Feb 16 14:47:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_fs.c,v 1.92 2021/01/19 03:41:22 simonb Exp $ */
+/* $NetBSD: netbsd32_fs.c,v 1.93 2021/02/16 14:47:20 simonb Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.92 2021/01/19 03:41:22 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.93 2021/02/16 14:47:20 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -825,6 +825,7 @@
udata = data = SCARG_P32(uap, data);
memset(&fs_args32, 0, sizeof(fs_args32));
+ memset(&fs_args, 0, sizeof(fs_args));
error = copyinstr(type, mtype, sizeof(mtype), &len);
if (error)
Home |
Main Index |
Thread Index |
Old Index