Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-0]: src/sys/arch/amd64/amd64 Pull up following revision(s) (req...
details: https://anonhg.NetBSD.org/src/rev/48a374eca698
branches: netbsd-7-0
changeset: 446424:48a374eca698
user: martin <martin%NetBSD.org@localhost>
date: Tue Dec 04 19:18:12 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1662):
sys/arch/amd64/amd64/machdep.c: revision 1.321
Fix stack info leak. There is a big padding in struct sigframe_siginfo.
[ 224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[ 224.016977] #0 0xffffffff80224d0a in kleak_note <netbsd>
[ 224.026268] #1 0xffffffff80224d8a in kleak_copyout <netbsd>
[ 224.026268] #2 0xffffffff802224b5 in sendsig_siginfo <netbsd>
[ 224.036261] #3 0xffffffff80b51564 in sendsig <netbsd>
[ 224.046475] #4 0xffffffff80b51282 in postsig <netbsd>
[ 224.046475] #5 0xffffffff80b2fc5d in lwp_userret <netbsd>
[ 224.056273] #6 0xffffffff8025a951 in mi_userret <netbsd>
[ 224.066277] #7 0xffffffff8025ab89 in syscall <netbsd>
diffstat:
sys/arch/amd64/amd64/machdep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 88e5920606d9 -r 48a374eca698 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Fri Nov 30 10:41:14 2018 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Tue Dec 04 19:18:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.211.6.2 2018/01/22 19:40:25 snj Exp $ */
+/* $NetBSD: machdep.c,v 1.211.6.3 2018/12/04 19:18:12 martin Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.6.2 2018/01/22 19:40:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.6.3 2018/12/04 19:18:12 martin Exp $");
/* #define XENDEBUG_LOW */
@@ -570,6 +570,7 @@
/* Round down the stackpointer to a multiple of 16 for the ABI. */
fp = (struct sigframe_siginfo *)(((unsigned long)sp & ~15) - 8);
+ memset(&frame, 0, sizeof(frame));
frame.sf_ra = (uint64_t)ps->sa_sigdesc[sig].sd_tramp;
frame.sf_si._info = ksi->ksi_info;
frame.sf_uc.uc_flags = _UC_SIGMASK;
@@ -577,7 +578,6 @@
frame.sf_uc.uc_link = l->l_ctxlink;
frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
? _UC_SETSTACK : _UC_CLRSTACK;
- memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack));
sendsig_reset(l, sig);
mutex_exit(p->p_lock);
Home |
Main Index |
Thread Index |
Old Index