]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:24:17 +0000 (13:24 -0800)
commit99b6f6c69d47e4e61856884e96020bb4a57d6158
tree983bfa2377657a6295b52ffb3cf727fd5ac5789a
parentb2fcddfdd588f3a719fc50f3ef0934daa0d2cbe1
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