Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern ktrace(9): Zero-initialize padding for ktr_psig rec...
details: https://anonhg.NetBSD.org/src/rev/77b7d54042a3
branches: trunk
changeset: 368244:77b7d54042a3
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Jul 01 01:07:56 2022 +0000
description:
ktrace(9): Zero-initialize padding for ktr_psig records.
Reported-by: syzbot+03fbfa20e6c7a3919a06%syzkaller.appspotmail.com@localhost
diffstat:
sys/kern/kern_ktrace.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b0df4d56c370 -r 77b7d54042a3 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c Fri Jul 01 01:07:32 2022 +0000
+++ b/sys/kern/kern_ktrace.c Fri Jul 01 01:07:56 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ktrace.c,v 1.181 2022/06/29 22:10:43 riastradh Exp $ */
+/* $NetBSD: kern_ktrace.c,v 1.182 2022/07/01 01:07:56 riastradh Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.181 2022/06/29 22:10:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.182 2022/07/01 01:07:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -790,6 +790,7 @@
if (ktealloc(&kte, (void *)&kbuf, l, KTR_PSIG, sizeof(*kbuf)))
return;
+ memset(&kbuf->kp, 0, sizeof(kbuf->kp));
kbuf->kp.signo = (char)sig;
kbuf->kp.action = action;
kbuf->kp.mask = *mask;
Home |
Main Index |
Thread Index |
Old Index