Don't read userland pointers directly, copy them first into kernel land
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 1 Dec 2004 21:38:50 +0000 (21:38 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 1 Dec 2004 21:38:50 +0000 (21:38 +0000)
commitd80771bb03827475e0ab13df3e658e7485021511
treea7c232269ab6f963bccc84e7f64d72a6464a919f
parentc8b09d931d56ee14c3aa7814599958c1d68380e3
Don't read userland pointers directly, copy them first into kernel land
and verify the location.

Security-fix for CAN-2004-1066 (FreeBSD-SA-04:17.procfs).

Submitted-by: Colin Percival <colin.percival@wadham.ox.ac.uk>
Credits: Bryan Fulton, Ted Unangst, and the SWAT analysis tool
         Coverity, Inc.
sys/vfs/procfs/procfs_status.c