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/3f1f6597e166
branches: netbsd-8
changeset: 446289:3f1f6597e166
user: martin <martin%NetBSD.org@localhost>
date: Thu Nov 29 14:59:56 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1113):
sys/kern/kern_sig.c: revision 1.350
Fix kernel info leak, 4 bytes of padding at the end of struct sigaction.
+ Possible info leak: [len=32, leaked=4]
| #0 0xffffffff80baf327 in kleak_copyout
| #1 0xffffffff80bd9ca8 in sys___sigaction_sigtramp
| #2 0xffffffff80259c42 in syscall
diffstat:
sys/kern/kern_sig.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r c0560a5acde5 -r 3f1f6597e166 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Thu Nov 29 14:58:25 2018 +0000
+++ b/sys/kern/kern_sig.c Thu Nov 29 14:59:56 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.336.4.2 2018/04/12 13:42:48 martin Exp $ */
+/* $NetBSD: kern_sig.c,v 1.336.4.3 2018/11/29 14:59:56 martin Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.336.4.2 2018/04/12 13:42:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.336.4.3 2018/11/29 14:59:56 martin Exp $");
#include "opt_ptrace.h"
#include "opt_dtrace.h"
@@ -189,6 +189,13 @@
return result;
}
+static int
+sigacts_ctor(void *arg __unused, void *obj, int flags __unused)
+{
+ memset(obj, 0, sizeof(struct sigacts));
+ return 0;
+}
+
/*
* signal_init:
*
@@ -202,7 +209,7 @@
sigacts_cache = pool_cache_init(sizeof(struct sigacts), 0, 0, 0,
"sigacts", sizeof(struct sigacts) > PAGE_SIZE ?
- &sigactspool_allocator : NULL, IPL_NONE, NULL, NULL, NULL);
+ &sigactspool_allocator : NULL, IPL_NONE, sigacts_ctor, NULL, NULL);
ksiginfo_cache = pool_cache_init(sizeof(ksiginfo_t), 0, 0, 0,
"ksiginfo", NULL, IPL_VM, NULL, NULL, NULL);
Home |
Main Index |
Thread Index |
Old Index