Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/kern Pull up following revision(s) (requested by maxv...



details:   https://anonhg.NetBSD.org/src/rev/d1e9cfe30aa6
branches:  netbsd-8
changeset: 852177:d1e9cfe30aa6
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Dec 12 11:33:29 2018 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1134):

        sys/kern/sys_sig.c: revision 1.47

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 09dc947248d1 -r d1e9cfe30aa6 sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c        Mon Dec 10 17:17:08 2018 +0000
+++ b/sys/kern/sys_sig.c        Wed Dec 12 11:33:29 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.46.8.1 2018/12/12 11:33:29 martin 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.46.8.1 2018/12/12 11:33:29 martin 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