mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
splice: fix user pointer access in get_iovec_page_array()
Commit 8811930dc7
("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>
This commit is contained in:
parent
25f6663006
commit
712a30e63c
1 changed files with 1 additions and 1 deletions
|
@ -1234,7 +1234,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
|
|||
if (unlikely(!len))
|
||||
break;
|
||||
error = -EFAULT;
|
||||
if (unlikely(!base))
|
||||
if (!access_ok(VERIFY_READ, base, len))
|
||||
break;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue