Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2016-12-09 09:19:31 +0100
committerTakashi Iwai <tiwai@suse.de>2016-12-09 10:49:02 +0100
commit2dff45209128e20ac96876e17ef8654844673244 (patch)
tree46bae477c1011539cee0e8cf9cf749c1f87ecccc
parent3fc552795273b88f4d954f887babbd1f4bdd538a (diff)
Don't feed anything but regular iovec's to blk_rq_map_user_iovrpm-4.4.21-90-dirty
(CVE-2016-9576 bsc#1013604). suse-commit: fc1fe0e3bad405be09494c5df2e17c0ab38eaf66
-rw-r--r--block/blk-map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index f565e11f465a..f56b622f10a4 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -90,6 +90,9 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
if (!iter || !iter->count)
return -EINVAL;
+ if (!iter_is_iovec((struct iov_iter *) iter))
+ return -EINVAL;
+
iov_for_each(iov, i, *iter) {
unsigned long uaddr = (unsigned long) iov.iov_base;