diff options
author | Philipp Stanner <pstanner@redhat.com> | 2023-11-02 19:15:26 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-12-01 17:00:53 +0100 |
commit | 1f829359c8c37f77a340575957686ca8c4bca317 (patch) | |
tree | 3115597707b88ccfafc3cc83e32b2d4dd36fe7c8 /drivers/ssb/pcmcia.c | |
parent | KVM: s390: Harden copying of userspace-array against overflow (diff) | |
download | linux-1f829359c8c37f77a340575957686ca8c4bca317.tar.xz linux-1f829359c8c37f77a340575957686ca8c4bca317.zip |
KVM: Harden copying of userspace-array against overflow
kvm_main.c utilizes vmemdup_user() and array_size() to copy a userspace
array. Currently, this does not check for an overflow.
Use the new wrapper vmemdup_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>
Link: https://lore.kernel.org/r/20231102181526.43279-4-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 'drivers/ssb/pcmcia.c')
0 files changed, 0 insertions, 0 deletions