aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGravatar Oliver Upton <oliver.upton@linux.dev> 2024-04-24 17:39:58 +0000
committerGravatar Oliver Upton <oliver.upton@linux.dev> 2024-04-24 19:09:35 +0000
commit6ddb4f372fc63210034b903d96ebbeb3c7195adb (patch)
treed550248eb3b7515c4cb149802bbf2b45d56cfcc9 /tools
parentLinux 6.9-rc3 (diff)
downloadlinux-6ddb4f372fc63210034b903d96ebbeb3c7195adb.tar.gz
linux-6ddb4f372fc63210034b903d96ebbeb3c7195adb.tar.bz2
linux-6ddb4f372fc63210034b903d96ebbeb3c7195adb.zip
KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()
vgic_v2_parse_attr() is responsible for finding the vCPU that matches the user-provided CPUID, which (of course) may not be valid. If the ID is invalid, kvm_get_vcpu_by_id() returns NULL, which isn't handled gracefully. Similar to the GICv3 uaccess flow, check that kvm_get_vcpu_by_id() actually returns something and fail the ioctl if not. Cc: stable@vger.kernel.org Fixes: 7d450e282171 ("KVM: arm/arm64: vgic-new: Add userland access to VGIC dist registers") Reported-by: Alexander Potapenko <glider@google.com> Tested-by: Alexander Potapenko <glider@google.com> Reviewed-by: Alexander Potapenko <glider@google.com> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20240424173959.3776798-2-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions