summaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2010-09-10 14:16:00 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-26 17:18:30 -0700
commit1d506ee42d387f84cd063fff8014d8decc1875c4 (patch)
tree430c37d67a2e2525ab04662fbb621761251fc828 /net/lapb/lapb_timer.c
parent94c195797a9c05cb34426abb0fd38d254d293591 (diff)
downloadkernel-crypto-1d506ee42d387f84cd063fff8014d8decc1875c4.tar.gz
kernel-crypto-1d506ee42d387f84cd063fff8014d8decc1875c4.tar.xz
kernel-crypto-1d506ee42d387f84cd063fff8014d8decc1875c4.zip
aio: check for multiplication overflow in do_io_submit
commit 75e1c70fc31490ef8a373ea2a4bea2524099b478 upstream. Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                return -EFAULT;                      ^^^^^^^^^^^^^^^^^^ The attached patch checks for overflow, and if it is detected, the number of iocbs submitted is scaled down to a number that will fit in the long.  This is an ok thing to do, as sys_io_submit is documented as returning the number of iocbs submitted, so callers should handle a return value of less than the 'nr' argument passed in. Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com> Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions