Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix stack info leak.
details: https://anonhg.NetBSD.org/src/rev/54e1b654e7b8
branches: trunk
changeset: 837332:54e1b654e7b8
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Nov 29 11:45:52 2018 +0000
description:
Fix stack info leak.
+ Possible info leak: [len=136, leaked=92]
| #0 0xffffffff80baf397 in kleak_copyout
| #1 0xffffffff80bd4155 in ptrace_copyout_siginfo
| #2 0xffffffff80bd5348 in do_ptrace
| #3 0xffffffff80bd40fe in sys_ptrace
| #4 0xffffffff80259c42 in syscall
diffstat:
sys/kern/sys_ptrace_common.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b33914dcc432 -r 54e1b654e7b8 sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c Thu Nov 29 11:23:49 2018 +0000
+++ b/sys/kern/sys_ptrace_common.c Thu Nov 29 11:45:52 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_ptrace_common.c,v 1.45 2018/06/23 03:32:48 christos Exp $ */
+/* $NetBSD: sys_ptrace_common.c,v 1.46 2018/11/29 11:45:52 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.45 2018/06/23 03:32:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.46 2018/11/29 11:45:52 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_ptrace.h"
@@ -570,6 +570,7 @@
{
struct ptrace_siginfo psi;
+ memset(&psi, 0, sizeof(psi));
psi.psi_siginfo._info = t->p_sigctx.ps_info;
psi.psi_lwpid = t->p_sigctx.ps_lwp;
DPRINTF(("%s: lwp=%d signal=%d\n", __func__, psi.psi_lwpid,
Home |
Main Index |
Thread Index |
Old Index