]> git.baikalelectronics.ru Git - kernel.git/commit
arm/arm64: KVM: Feed initialized memory to MMIO accesses
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 15 Feb 2016 17:04:04 +0000 (17:04 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 24 Feb 2016 11:53:09 +0000 (11:53 +0000)
commitbecb495f38ee4f229ddd1ab163f064106e95fa53
tree1e2326fcf2543367d7b7b47166eb2191224940e2
parent616625365bddd733b3953c76319724fba6c97eb8
arm/arm64: KVM: Feed initialized memory to MMIO accesses

On an MMIO access, we always copy the on-stack buffer info
the shared "run" structure, even if this is a read access.
This ends up leaking up to 8 bytes of uninitialized memory
into userspace, depending on the size of the access.

An obvious fix for this one is to only perform the copy if
this is an actual write.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kvm/mmio.c