Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/5cdc00e91f5c
branches:  netbsd-7
changeset: 800600:5cdc00e91f5c
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Dec 27 12:00:10 2018 +0000

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

        sys/kern/kern_time.c: revision 1.191

Fix kernel info leak. There are 2x4 bytes of padding in struct itimerval.

[  738.451860] kleak: Possible leak in copyout: [len=32, leaked=8]
[  738.481840] #0 0xffffffff80b7c42a in kleak_note <netbsd>
[  738.491821] #1 0xffffffff80b7c4aa in kleak_copyout <netbsd>
[  738.501806] #2 0xffffffff80b6154e in sys___getitimer50 <netbsd>
[  738.511778] #3 0xffffffff80b61e39 in sys___setitimer50 <netbsd>
[  738.521781] #4 0xffffffff8025ab3c in sy_call <netbsd>
[  738.521781] #5 0xffffffff8025ad6e in sy_invoke <netbsd>
[  738.531808] #6 0xffffffff8025adf4 in syscall <netbsd>

diffstat:

 sys/kern/kern_time.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 89306d024aa2 -r 5cdc00e91f5c sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Tue Dec 25 11:33:02 2018 +0000
+++ b/sys/kern/kern_time.c      Thu Dec 27 12:00:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $       */
+/*     $NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $       */
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/resourcevar.h>
@@ -1030,6 +1030,7 @@
        struct itimerval aitv;
        int error;
 
+       memset(&aitv, 0, sizeof(aitv));
        error = dogetitimer(p, SCARG(uap, which), &aitv);
        if (error)
                return error;



Home | Main Index | Thread Index | Old Index