Commit f3587d76 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

block: Clear kernel memory before copying to user

If the kernel allocates a bounce buffer for user read data, this memory
needs to be cleared before copying it to the user, otherwise it may leak
kernel memory to user space.

Laurence Oberman <>
Signed-off-by: default avatarKeith Busch <>
Signed-off-by: default avatarJens Axboe <>
parent e31d36b0
......@@ -1260,6 +1260,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
} else {
iov_iter_advance(iter, bio->bi_iter.bi_size);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment