Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix kernel info leak, 4 bytes of padding in struct ...
details: https://anonhg.NetBSD.org/src/rev/c24eac122418
branches: trunk
changeset: 995002:c24eac122418
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Dec 01 14:05:33 2018 +0000
description:
Fix kernel info leak, 4 bytes of padding in struct _ksiginfo. Maybe we
should just set _pad to zero on LP64?
+ Possible info leak: [len=40, leaked=4]
| #0 0xffffffff80baf397 in kleak_copyout
| #1 0xffffffff80bda817 in sigtimedwait1
| #2 0xffffffff80bdab95 in sys_____sigtimedwait50
| #3 0xffffffff80259c42 in syscall
diffstat:
sys/kern/sys_sig.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r dcbd52948608 -r c24eac122418 sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c Sat Dec 01 13:32:55 2018 +0000
+++ b/sys/kern/sys_sig.c Sat Dec 01 14:05:33 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_sig.c,v 1.46 2016/08/04 06:43:43 christos Exp $ */
+/* $NetBSD: sys_sig.c,v 1.47 2018/12/01 14:05:33 maxv Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.46 2016/08/04 06:43:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.47 2018/12/01 14:05:33 maxv Exp $");
#include "opt_dtrace.h"
@@ -766,6 +766,8 @@
*/
sigminusset(&sigcantmask, &l->l_sigwaitset);
+ memset(&ksi.ksi_info, 0, sizeof(ksi.ksi_info));
+
mutex_enter(p->p_lock);
/* Check for pending signals in the process, if no - then in LWP. */
Home |
Main Index |
Thread Index |
Old Index