Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix info leak. The padding of 'sigact' is not initi...
details: https://anonhg.NetBSD.org/src/rev/c014bd2596e8
branches: trunk
changeset: 1000089:c014bd2596e8
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Jul 05 17:14:48 2019 +0000
description:
Fix info leak. The padding of 'sigact' is not initialized, it gets copied
in the proc, and can later be obtained by userland.
diffstat:
sys/kern/kern_exec.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 0373e4c6f9e1 -r c014bd2596e8 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Fri Jul 05 17:08:55 2019 +0000
+++ b/sys/kern/kern_exec.c Fri Jul 05 17:14:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.477 2019/06/27 19:56:10 maxv Exp $ */
+/* $NetBSD: kern_exec.c,v 1.478 2019/07/05 17:14:48 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.477 2019/06/27 19:56:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.478 2019/07/05 17:14:48 maxv Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -2074,6 +2074,7 @@
/* handle posix_spawnattr */
if (spawn_data->sed_attrs != NULL) {
struct sigaction sigact;
+ memset(&sigact, 0, sizeof(sigact));
sigact._sa_u._sa_handler = SIG_DFL;
sigact.sa_flags = 0;
Home |
Main Index |
Thread Index |
Old Index