summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPhilipp Stanner <pstanner@redhat.com>2023-11-02 19:15:25 +0100
committerSean Christopherson <seanjc@google.com>2023-12-01 08:00:42 -0800
commit8c4976772d9b5858b8b456e84783e089c6cfa66e (patch)
treefec2e9235c35aa2446f6054e71001bc73d8ccb63 /virt
parent573cc0e5cf142d9992d2de3502800890fc717bc0 (diff)
downloadlinux-stable-8c4976772d9b5858b8b456e84783e089c6cfa66e.tar.gz
linux-stable-8c4976772d9b5858b8b456e84783e089c6cfa66e.tar.bz2
linux-stable-8c4976772d9b5858b8b456e84783e089c6cfa66e.zip
KVM: s390: Harden copying of userspace-array against overflow
guestdbg.c utilizes memdup_user() to copy a userspace array. This, currently, does not check for an overflow. Use the new wrapper memdup_array_user() to copy the array more safely. Note, KVM explicitly checks the number of entries before duplicating the array, i.e. adding the overflow check should be a glorified nop. Suggested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com> Link: https://lore.kernel.org/r/20231102181526.43279-3-pstanner@redhat.com [sean: call out that KVM pre-checks the number of entries] Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions