Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-0]: src/sys/kern Pull up following revision(s) (requested by mr...
details: https://anonhg.NetBSD.org/src/rev/2171c946cd99
branches: netbsd-7-0
changeset: 801373:2171c946cd99
user: snj <snj%NetBSD.org@localhost>
date: Sat Aug 19 05:21:56 2017 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #1481):
sys/kern/kern_ktrace.c: 1.171 via patch
Clamp the length we use, not the length we don't.
Avoids uninitialized memory disclosure to userland.
>From Ilja Van Sprundel.
diffstat:
sys/kern/kern_ktrace.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 796b80f73322 -r 2171c946cd99 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c Sat Aug 19 05:19:28 2017 +0000
+++ b/sys/kern/kern_ktrace.c Sat Aug 19 05:21:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ktrace.c,v 1.164.4.1 2014/12/01 11:38:42 martin Exp $ */
+/* $NetBSD: kern_ktrace.c,v 1.164.4.1.2.1 2017/08/19 05:21:56 snj Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.164.4.1 2014/12/01 11:38:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.164.4.1.2.1 2017/08/19 05:21:56 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -931,7 +931,7 @@
user_dta = (void *)(ktp + 1);
if ((error = copyin(addr, (void *)user_dta, len)) != 0)
- len = 0;
+ kte->kte_kth.ktr_len = 0;
ktraddentry(l, kte, KTA_WAITOK);
return error;
Home |
Main Index |
Thread Index |
Old Index