summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMostafa Saleh <smostafa@google.com>2026-07-02 10:38:40 +0000
committerMarc Zyngier <maz@kernel.org>2026-07-07 11:25:50 +0100
commit8c6db30d79528279abbeb416e4f533f1f91b8724 (patch)
treef5e86ff4e9b7729a1a72af564f95cff5cfb4c213 /drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
parent65a38ddeaeed1a962bc1b4ca03c98201c877fea5 (diff)
KVM: arm64: Fix bounds checking in do_ffa_mem_reclaim()
Sashiko (locally) reports out of bound write possiblity if SPMD returns an invalid data. While SPMD is considered trusted, pKVM does some basic checks, for offset to be less than or equal len. However, that is incorrect as even if the offset is smaller than len pKVM can still access out of bound memory in the next ffa_host_unshare_ranges(). Split this check into 2: 1- Check that the fixed portion of the descriptor fits. 2- After getting reg, check the variable array size addr_range_cnt fits. Also, drop the WARN_ONs as that will panic the kernel and in the next checks there are no WARNs, so that makes it consistent. Fixes: 0a9f15fd5674 ("KVM: arm64: pkvm: Add support for fragmented FF-A descriptors") Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Vincent Donnefort <vdonnefort@google.com> Signed-off-by: Sebastian Ene <sebastianene@google.com> Link: https://patch.msgid.link/20260702103848.1647249-4-sebastianene@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions