Introduce a uiomove_frombuf helper routine that handles computing and
authorDavid Rhodus <drhodus@dragonflybsd.org>
Thu, 2 Oct 2003 19:21:06 +0000 (19:21 +0000)
committerDavid Rhodus <drhodus@dragonflybsd.org>
Thu, 2 Oct 2003 19:21:06 +0000 (19:21 +0000)
commit25e80b0639ae05d01f3b1be4e6763f1103430b9f
tree628c0241b79f7d9821a269a176f34647da3b6293
parent16777b6b80704a4e4e566f8f1fb6e5a883c74750
 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.

 Reported by:    Joost Pol <joost@pine.nl>  (integer underflows/overflows)
 Originated from: FreeBSD
sys/kern/kern_subr.c
sys/sys/uio.h
sys/vfs/procfs/procfs_dbregs.c
sys/vfs/procfs/procfs_fpregs.c
sys/vfs/procfs/procfs_regs.c
sys/vfs/procfs/procfs_rlimit.c
sys/vfs/procfs/procfs_status.c