summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/splice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c
index e263d3b36145..dbbe267211b1 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1182,6 +1182,9 @@ static int get_iovec_page_array(const struct iovec __user *iov,
if (unlikely(!base))
break;
+ if (!access_ok(VERIFY_READ, base, len))
+ break;
+
/*
* Get this base offset and number of pages, then map
* in the user pages.