bio: take care not overflow page count when mapping/copying user data
commite04e0db0e3c8fe2aafc618c1dd1bd1357e14be58
authorJens Axboe <jaxboe@fusionio.com>
Wed, 10 Nov 2010 13:36:25 +0000 (10 14:36 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:57 +0000 (21 12:43 -0700)
tree143fc619db827e3d659281f18540250b76513b12
parent459af1da6108bd3cc9dcee2df7399b7659f95426
bio: take care not overflow page count when mapping/copying user data

commit cb4644cac4a2797afc847e6c92736664d4b0ea34 upstream.

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>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/bio.c