mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
iov_iter: fix the uaccess area in copy_compat_iovec_from_user
[ Upstream commita959a9782f] sizeof needs to be called on the compat pointer, not the native one. Fixes:89cd35c58b("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>
This commit is contained in:
parent
ce4d02da78
commit
37d4f78ae2
|
|
@ -1658,7 +1658,7 @@ static int copy_compat_iovec_from_user(struct iovec *iov,
|
|||
(const struct compat_iovec __user *)uvec;
|
||||
int ret = -EFAULT, i;
|
||||
|
||||
if (!user_access_begin(uvec, nr_segs * sizeof(*uvec)))
|
||||
if (!user_access_begin(uiov, nr_segs * sizeof(*uiov)))
|
||||
return -EFAULT;
|
||||
|
||||
for (i = 0; i < nr_segs; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user