projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e31d36b
)
block: Clear kernel memory before copying to user
author
Keith Busch
<keith.busch@intel.com>
Wed, 7 Nov 2018 14:37:45 +0000
(07:37 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 7 Nov 2018 22:41:31 +0000
(15:41 -0700)
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 <loberman@redhat.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
patch
|
blob
|
history
diff --git
a/block/bio.c
b/block/bio.c
index 4a5a036268fb8e2dd78be6aba55a255dffb98c52..9a9c59067521304aff88b450fb8f2499bf2e7201 100644
(file)
--- a/
block/bio.c
+++ b/
block/bio.c
@@
-1260,6
+1260,7
@@
struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
} else {
+ zero_fill_bio(bio);
iov_iter_advance(iter, bio->bi_iter.bi_size);
}