KVM: coalesced_mmio: add bounds checking
The first/last indexes are typically shared with a user app.
The app can change the 'last' index that the kernel uses
to store the next result. This change sanity checks the index
before using it for writing to a potentially arbitrary address.
Signed-off-by: Matt Delco <delco@chromium.org>
Orabug:
30318042
CVE: CVE-2019-14821
[setje: This patch came to UEK while still under embargo.]
Signed-off-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>