]> rtime.felk.cvut.cz Git - linux-imx.git/commit
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)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:11 +0000 (23:40 +0100)
commit6d166dd8e4157e9381a2d4dd2f77eda2600fa783
tree92890693de263b7e80d15fc5974cc21aefcf92b3
parent533f966c7aeae378188c9ec5b8635a4afabb8ea3
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/bio.c