Module Name:    src
Committed By:   riastradh
Date:           Tue Jun 20 15:22:15 UTC 2023

Modified Files:
        src/sys/compat/linux32/arch/amd64: linux32_machdep.c

Log Message:
linux32_rt_sendsig: Memset zero before copyout.

Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.

XXX pullup-8
XXX pullup-9
XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 \
    src/sys/compat/linux32/arch/amd64/linux32_machdep.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/linux32/arch/amd64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.47 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.48
--- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.47	Mon Nov  1 05:07:16 2021
+++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c	Tue Jun 20 15:22:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $ */
+/*	$NetBSD: linux32_machdep.c,v 1.48 2023/06/20 15:22:15 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.48 2023/06/20 15:22:15 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_user_ldt.h"
@@ -195,6 +195,7 @@ linux32_rt_sendsig(const ksiginfo_t *ksi
 	fp--;
 
 	/* Build stack frame for signal trampoline. */
+	memset(&frame, 0, sizeof(frame));
 	NETBSD32PTR32(frame.sf_handler, catcher);
 	frame.sf_sig = native_to_linux32_signo[sig];
 	NETBSD32PTR32(frame.sf_sip, &fp->sf_si);

Reply via email to