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
This commit is contained in:
riastradh 2023-06-20 15:22:15 +00:00
parent 46aa4c99e5
commit 695ce1f326
1 changed files with 3 additions and 2 deletions

View File

@ -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, const sigset_t *mask)
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);