]> git.baikalelectronics.ru Git - kernel.git/commit
splice: fix user pointer access in get_iovec_page_array()
authorBastian Blank <bastian@waldi.eu.org>
Sun, 10 Feb 2008 14:47:57 +0000 (16:47 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 10 Feb 2008 18:27:21 +0000 (10:27 -0800)
commit2f277243d9a95f1808f0c0e979d632b29f366819
tree0562431cf00ccb740547b13a41d79f6319254ca0
parent415910ce6d1e12a0dee558351ba3f003b815a026
splice: fix user pointer access in get_iovec_page_array()

Commit bb34c2b2405f9e03aa897a3998001a094278088e ("splice: missing user
pointer access verification") added the proper access_ok() calls to
copy_from_user_mmap_sem() which ensures we can copy the struct iovecs
from userspace to the kernel.

But we also must check whether we can access the actual memory region
pointed to by the struct iovec to fix the access checks properly.

Signed-off-by: Bastian Blank <waldi@debian.org>
Acked-by: Oliver Pinter <oliver.pntr@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/splice.c