AIO: properly check iovec sizes
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 01:36:21 +0000 (17:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 19:57:46 +0000 (11:57 -0800)
commitff19ac8fb71e8a2bf07d61b959062998139c1104
treefcf58a138f297889ce47fcd22b6c9bf5af2b1811
parent8355335f9bea09864ca2cba55abf25e4486c13f9
AIO: properly check iovec sizes

In Linus's tree, the iovec code has been reworked massively, but in
older kernels the AIO layer should be checking this before passing the
request on to other layers.

Many thanks to Ben Hawkes of Google Project Zero for pointing out the
issue.

Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Tested-by: Willy Tarreau <w@1wt.eu>
[backported to 3.10 - willy]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/aio.c