Module Name: src Committed By: simonb Date: Tue Feb 16 14:47:20 UTC 2021
Modified Files: src/sys/compat/netbsd32: netbsd32_fs.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/compat/netbsd32/netbsd32_fs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/netbsd32/netbsd32_fs.c diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.92 src/sys/compat/netbsd32/netbsd32_fs.c:1.93 --- src/sys/compat/netbsd32/netbsd32_fs.c:1.92 Tue Jan 19 03:41:22 2021 +++ src/sys/compat/netbsd32/netbsd32_fs.c Tue Feb 16 14:47:20 2021 @@ -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 @@ netbsd32___mount50(struct lwp *l, const 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)