bio: take care not overflow page count when mapping/copying user data
authorJens Axboe <jaxboe@fusionio.com>
Wed, 10 Nov 2010 13:36:25 +0000 (14:36 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 10 Nov 2010 13:40:43 +0000 (14:40 +0100)
commitcb4644cac4a2797afc847e6c92736664d4b0ea34
tree14170d74d5040be49af14b484f252d888141a99f
parentf3f63c1c28bc861a931fac283b5bc3585efb8967
bio: take care not overflow page count when mapping/copying user data

If the iovec is being set up in a way that causes uaddr + PAGE_SIZE
to overflow, we could end up attempting to map a huge number of
pages. Check for this invalid input type.

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fs/bio.c