From: Greg Kroah-Hartman Date: Fri, 9 Dec 2016 07:41:17 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.38~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b268129968a6449d801640f8172342bb2d8dbb19;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: don-t-feed-anything-but-regular-iovec-s-to-blk_rq_map_user_iov.patch --- diff --git a/queue-4.4/don-t-feed-anything-but-regular-iovec-s-to-blk_rq_map_user_iov.patch b/queue-4.4/don-t-feed-anything-but-regular-iovec-s-to-blk_rq_map_user_iov.patch new file mode 100644 index 00000000000..e075dbde38a --- /dev/null +++ b/queue-4.4/don-t-feed-anything-but-regular-iovec-s-to-blk_rq_map_user_iov.patch @@ -0,0 +1,34 @@ +From a0ac402cfcdc904f9772e1762b3fda112dcc56a0 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Tue, 6 Dec 2016 16:18:14 -0800 +Subject: Don't feed anything but regular iovec's to blk_rq_map_user_iov + +From: Linus Torvalds + +commit a0ac402cfcdc904f9772e1762b3fda112dcc56a0 upstream. + +In theory we could map other things, but there's a reason that function +is called "user_iov". Using anything else (like splice can do) just +confuses it. + +Reported-and-tested-by: Johannes Thumshirn +Cc: Al Viro +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + block/blk-map.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/block/blk-map.c ++++ b/block/blk-map.c +@@ -90,6 +90,9 @@ int blk_rq_map_user_iov(struct request_q + 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; + diff --git a/queue-4.4/series b/queue-4.4/series index 1227c51dfa6..7284724d129 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -20,3 +20,4 @@ net-ping-check-minimum-size-on-icmp-header-length.patch sparc32-fix-inverted-invalid_frame_pointer-checks-on-sigreturns.patch sparc64-fix-find_node-warning-if-numa-node-cannot-be-found.patch sparc64-fix-compile-warning-section-mismatch-in-find_node.patch +don-t-feed-anything-but-regular-iovec-s-to-blk_rq_map_user_iov.patch