Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. This fixes CVE-2019-14821. Cc: [email protected] Fixes: 5f94c17 ("KVM: Add coalesced MMIO support (common part)") Signed-off-by: Matt Delco <[email protected]> Signed-off-by: Jim Mattson <[email protected]> Reported-by: [email protected] [Use READ_ONCE. - Paolo] Signed-off-by: Paolo Bonzini <[email protected]>
- Loading branch information