ArmPkg/ArmMmuLib AARCH64: fix out of bounds access
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 7 Jan 2019 07:15:00 +0000 (08:15 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 14 Jan 2019 18:46:57 +0000 (19:46 +0100)
commit76c23f9e0d0d65866e4195b0bc12c1ca2763ced2
tree1c780e6728c411e60498ec79ee214b19d325622a
parentd08575759e5a853e157e6e418e9fea5d5864f725
ArmPkg/ArmMmuLib AARCH64: fix out of bounds access

Take care not to dereference BlockEntry if it may be pointing past
the end of the page table we are manipulating. It is only a read,
and thus harmless, but HeapGuard triggers on it so let's fix it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c