iov_iter: fix the uaccess area in copy_compat_iovec_from_user
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Jan 2021 17:19:26 +0000 (18:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:55:09 +0000 (11:55 +0100)
commit37d4f78ae274d11c26eb7deb912f8fdf12bd2283
tree6bb43f011ef0b8bbf5dcf4ed9969c73fa8ab724c
parentce4d02da78a30e6ba6ed61a745900ae49985ba1e
iov_iter: fix the uaccess area in copy_compat_iovec_from_user

[ Upstream commit a959a9782fa87669feeed095ced5d78181a7c02d ]

sizeof needs to be called on the compat pointer, not the native one.

Fixes: 89cd35c58bc2 ("iov_iter: transparently handle compat iovecs in import_iovec")
Reported-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/iov_iter.c