diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-06-20 15:22:15 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-06-20 15:22:15 +0000 |
| commit | 7b47706c015d3340bb754c9fcd3eaa710b726fd8 (patch) | |
| tree | c1cbe7553b746c9098c1d3362a5a078305874e9b /sys | |
| parent | 729c2744275fb978ba44f55c0f39f9b123debe79 (diff) | |
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
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/compat/linux32/arch/amd64/linux32_machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/linux32/arch/amd64/linux32_machdep.c b/sys/compat/linux32/arch/amd64/linux32_machdep.c index e63619ef7b7..b85dbedda41 100644 --- a/sys/compat/linux32/arch/amd64/linux32_machdep.c +++ b/sys/compat/linux32/arch/amd64/linux32_machdep.c @@ -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); |
