AIO: properly check iovec sizes
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 01:36:21 +0000 (17:36 -0800)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 27 Feb 2019 02:13:11 +0000 (11:13 +0900)
commit51b654b613b03a4f94511e7e294ff5cce4b78c56
tree0142767d30d901f4e822cfc2e516342e3afe2ddf
parent160283cfd0d5ae01b232a7de14dc4859a697fecf
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-3.14.y stable commit c4f4b82694fe to fix CVE-2015-8830]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I2ebb37a6ab8d6cc1ea45ad713303612dc4a4b8af
fs/aio.c