]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: s390: avoid memory overwrites on emergency signal injection
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Thu, 5 Nov 2015 08:38:15 +0000 (09:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:20 +0000 (14:31 -0500)
commitc330c755997a2c338d9ac615655a1af0438521ed
tree291432116b7604d611cae3f70f47bd379b75aa0c
parentff3a0bb1f60713fd03ec8aa8e1a7f33402caf997
KVM: s390: avoid memory overwrites on emergency signal injection

commit b85de33a1a3433487b6a721cfdce25ec8673e622 upstream.

Commit 383d0b050106 ("KVM: s390: handle pending local interrupts via
bitmap") introduced a possible memory overwrite from user space.

User space could pass an invalid emergency signal code (sending VCPU)
and therefore exceed the bitmap. Let's take care of this case and
check that the id is in the valid range.

Reviewed-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/interrupt.c