summaryrefslogtreecommitdiff
path: root/scripts/extract-fwblobs
diff options
context:
space:
mode:
authorQuentin Perret <qperret@google.com>2025-02-13 18:36:14 +0300
committerMarc Zyngier <maz@kernel.org>2025-02-13 20:57:27 +0300
commitb938731ed2d4eea8e268a27bfc600581fedae2a9 (patch)
tree51f03a7fb0c8fd13a2c27783dfc1e9b6b8fe8f59 /scripts/extract-fwblobs
parent65729da9ce37f5a2c62e2542ef03bc9ac6775a7d (diff)
downloadlinux-b938731ed2d4eea8e268a27bfc600581fedae2a9.tar.xz
KVM: arm64: Fix alignment of kvm_hyp_memcache allocations
When allocating guest stage-2 page-table pages at EL2, pKVM can consume pages from the host-provided kvm_hyp_memcache. As pgtable.c expects zeroed pages, guest_s2_zalloc_page() actively implements this zeroing with a PAGE_SIZE memset. Unfortunately, we don't check the page alignment of the host-provided address before doing so, which could lead to the memset overrunning the page if the host was malicious. Fix this by simply force-aligning all kvm_hyp_memcache allocations to page boundaries. Fixes: 60dfe093ec13 ("KVM: arm64: Instantiate guest stage-2 page-tables at EL2") Reported-by: Ben Simner <ben.simner@cl.cam.ac.uk> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20250213153615.3642515-1-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions