From owner-cvs-all@FreeBSD.ORG Thu Oct 2 08:00:57 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0591C16A4B3; Thu, 2 Oct 2003 08:00:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F6C443FE1; Thu, 2 Oct 2003 08:00:56 -0700 (PDT) (envelope-from nectar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h92F0uXJ036508; Thu, 2 Oct 2003 08:00:56 -0700 (PDT) (envelope-from nectar@repoman.freebsd.org) Received: (from nectar@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h92F0tl1036507; Thu, 2 Oct 2003 08:00:55 -0700 (PDT) (envelope-from nectar) Message-Id: <200310021500.h92F0tl1036507@repoman.freebsd.org> From: Jacques Vidrine Date: Thu, 2 Oct 2003 08:00:55 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/procfs procfs_dbregs.c procfs_fpregs.c procfs_regs.c src/sys/fs/pseudofs pseudofs_vnops.c src/sys/kern kern_subr.c src/sys/sys uio.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 15:00:57 -0000 nectar 2003/10/02 08:00:55 PDT FreeBSD src repository Modified files: sys/fs/procfs procfs_dbregs.c procfs_fpregs.c procfs_regs.c sys/fs/pseudofs pseudofs_vnops.c sys/kern kern_subr.c sys/sys uio.h Log: Introduce a uiomove_frombuf helper routine that handles computing and validating the offset within a given memory buffer before handing the real work off to uiomove(9). Use uiomove_frombuf in procfs to correct several issues with integer arithmetic that could result in underflows/overflows. As a side-effect, the code is significantly simplified. Add additional sanity checks when computing a memory allocation size in pfs_read. Submitted by: rwatson (original uiomove_frombuf -- bugs are mine :-) Reported by: Joost Pol (integer underflows/overflows) Revision Changes Path 1.23 +3 -15 src/sys/fs/procfs/procfs_dbregs.c 1.29 +3 -15 src/sys/fs/procfs/procfs_fpregs.c 1.28 +3 -15 src/sys/fs/procfs/procfs_regs.c 1.42 +17 -15 src/sys/fs/pseudofs/pseudofs_vnops.c 1.77 +23 -0 src/sys/kern/kern_subr.c 1.28 +1 -0 src/sys/sys/uio.h