projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
151f52f
)
block: check for proper length of iov entries in blk_rq_map_user_iov()
author
Jens Axboe
<jaxboe@fusionio.com>
Fri, 29 Oct 2010 14:10:18 +0000
(08:10 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Wed, 10 Nov 2010 13:40:42 +0000
(14:40 +0100)
Ensure that we pass down properly validated iov segments before
calling into the mapping or copy functions.
Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-map.c
patch
|
blob
|
blame
|
history
diff --git
a/block/blk-map.c
b/block/blk-map.c
index d4a586d8691ec5ed37311d1e3fc76aa0c310828f..5d5dbe47c2285ee7ccb5f3ca784f9cdb8cb6df3e 100644
(file)
--- a/
block/blk-map.c
+++ b/
block/blk-map.c
@@
-205,6
+205,8
@@
int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
unaligned = 1;
break;
}
+ if (!iov[i].iov_len)
+ return -EINVAL;
}
if (unaligned || (q->dma_pad_mask & len) || map_data)