Merge tag 'kvm-x86-generic-6.8' of https://github.com/kvm-x86/linux into HEAD
Common KVM changes for 6.8: - Use memdup_array_user() to harden against overflow. - Unconditionally advertise KVM_CAP_DEVICE_CTRL for all architectures.
This commit is contained in:
+3
-3
@@ -4867,6 +4867,7 @@ static int kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
|
||||
#endif
|
||||
case KVM_CAP_BINARY_STATS_FD:
|
||||
case KVM_CAP_SYSTEM_EVENT_DATA:
|
||||
case KVM_CAP_DEVICE_CTRL:
|
||||
return 1;
|
||||
#ifdef CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES
|
||||
case KVM_CAP_MEMORY_ATTRIBUTES:
|
||||
@@ -5256,9 +5257,8 @@ static long kvm_vm_ioctl(struct file *filp,
|
||||
goto out;
|
||||
if (routing.nr) {
|
||||
urouting = argp;
|
||||
entries = vmemdup_user(urouting->entries,
|
||||
array_size(sizeof(*entries),
|
||||
routing.nr));
|
||||
entries = vmemdup_array_user(urouting->entries,
|
||||
routing.nr, sizeof(*entries));
|
||||
if (IS_ERR(entries)) {
|
||||
r = PTR_ERR(entries);
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user