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. There are 2x4 bytes of paddin...
details: https://anonhg.NetBSD.org/src/rev/e1ee0d83e27f
branches: trunk
changeset: 445798:e1ee0d83e27f
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Nov 13 07:16:33 2018 +0000
description:
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 548c8fbb8027 -r e1ee0d83e27f sys/kern/kern_time.c
--- a/sys/kern/kern_time.c Tue Nov 13 06:58:14 2018 +0000
+++ b/sys/kern/kern_time.c Tue Nov 13 07:16:33 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.190 2018/11/11 11:17:49 maxv Exp $ */
+/* $NetBSD: kern_time.c,v 1.191 2018/11/13 07:16:33 maxv 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.190 2018/11/11 11:17:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.191 2018/11/13 07:16:33 maxv Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -1068,6 +1068,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