From owner-cvs-all Sun Jul 2 1: 8:16 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 49A5737BAD4; Sun, 2 Jul 2000 01:08:11 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: (from green@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA17019; Sun, 2 Jul 2000 01:08:10 -0700 (PDT) (envelope-from green@FreeBSD.org) Message-Id: <200007020808.BAA17019@freefall.freebsd.org> From: Brian Feldman Date: Sun, 2 Jul 2000 01:08:10 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_ktrace.c sys_generic.c uipc_syscalls.c src/sys/svr4 svr4_stream.c src/sys/sys ktrace.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG green 2000/07/02 01:08:10 PDT Modified files: sys/kern kern_ktrace.c sys_generic.c uipc_syscalls.c sys/svr4 svr4_stream.c sys/sys ktrace.h Log: Modify ktrace's general I/O tracing, ktrgenio(), to use a struct uio * instead of a struct iovec * array and int len. Get rid of stupidly trying to allocate all of the memory and copyin()ing the entire iovec[], and instead just do the proper VOP_WRITE() in ktrwrite() using a copy of the struct uio that the syscall originally used. This solves the DoS which could easily be performed; to work around the DoS, one could also remove "options KTRACE" from the kernel. This is a very strong MFC candidate for 4.1. Found by: art@OpenBSD.org Revision Changes Path 1.37 +29 -35 src/sys/kern/kern_ktrace.c 1.58 +37 -16 src/sys/kern/sys_generic.c 1.70 +15 -7 src/sys/kern/uipc_syscalls.c 1.14 +15 -7 src/sys/svr4/svr4_stream.c 1.21 +2 -2 src/sys/sys/ktrace.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message