KVM: s390: prevent buffer overrun on memory hotplug during migration
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 21 Dec 2017 08:18:22 +0000 (09:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2018 08:31:23 +0000 (09:31 +0100)
commit77bbeea7811f0857952d3f096438ce2e1bb16f1a
treedd1bb956269a08b166754d4b0c204e7b4c8c5eb4
parent853bcadeefe18ee0661a302811a17644b1f9e80b
KVM: s390: prevent buffer overrun on memory hotplug during migration

commit c2cf265d860882b51a200e4a7553c17827f2b730 upstream.

We must not go beyond the pre-allocated buffer. This can happen when
a new memory slot is added during migration.

Reported-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/priv.c