linux-uconsole/arch/s390/kvm
Christian Borntraeger 70be4d76c0 KVM: S390: fix potential array overrun in intercept handling
commit 062d5e9b0d upstream.

kvm_handle_sie_intercept uses a jump table to get the intercept handler
for a SIE intercept. Static code analysis revealed a potential problem:
the intercept_funcs jump table was defined to contain (0x48 >> 2) entries,
but we only checked for code > 0x48 which would cause an off-by-one
array overflow if code == 0x48.

Use the compiler and ARRAY_SIZE to automatically set the limits.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-28 15:02:40 -08:00
..
diag.c [S390] Use unsigned long long for u64 on 64bit. 2009-01-09 12:15:07 +01:00
gaccess.h KVM: s390: streamline memslot handling 2009-09-10 08:32:42 +03:00
intercept.c KVM: S390: fix potential array overrun in intercept handling 2010-01-28 15:02:40 -08:00
interrupt.c trivial: remove unnecessary semicolons 2009-09-21 15:14:58 +02:00
Kconfig KVM: remove old KVMTRACE support code 2009-09-10 08:33:03 +03:00
kvm-s390.c KVM: s390: Make psw available on all exits, not just a subset 2009-12-18 14:03:35 -08:00
kvm-s390.h KVM: s390: fix memsize >= 4G 2009-10-04 13:57:23 +02:00
Makefile KVM: s390: intercepts for diagnose instructions 2008-04-27 12:00:46 +03:00
priv.c KVM: s390: Allow stfle instruction in the guest 2009-06-28 14:10:30 +03:00
sie64a.S KVM: s390: arch backend for the kvm kernel module 2008-04-27 12:00:42 +03:00
sigp.c KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c 2009-12-18 14:03:34 -08:00