block: Clear kernel memory before copying to user
authorKeith Busch <keith.busch@intel.com>
Wed, 7 Nov 2018 14:37:45 +0000 (07:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:13:05 +0000 (16:13 +0100)
commita4da95ea101b2741488c6d84d3ce6e3d0cdffd62
tree6407fe53c36a96abd58e52bce90038204c32139a
parentb352afaac108d9d6c10cd1d9cd6155b83b779b65
block: Clear kernel memory before copying to user

[ Upstream commit f3587d76da05f68098ddb1cb3c98cc6a9e8a402c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/bio.c