Files
twx-linux/include/linux
Jim Mattson ad9241f24f kvm: Change offset in kvm_write_guest_offset_cached to unsigned
[ Upstream commit 7a86dab8cf ]

Since the offset is added directly to the hva from the
gfn_to_hva_cache, a negative offset could result in an out of bounds
write. The existing BUG_ON only checks for addresses beyond the end of
the gfn_to_hva_cache, not for addresses before the start of the
gfn_to_hva_cache.

Note that all current call sites have non-negative offsets.

Fixes: 4ec6e86362 ("kvm: Introduce kvm_write_guest_offset_cached()")
Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Cfir Cohen <cfir@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:47:16 +01:00
..
2018-11-21 09:19:16 +01:00
2018-06-15 18:10:01 -03:00
2018-08-22 10:52:48 -07:00
2018-01-01 12:40:27 -07:00
2018-11-13 11:08:50 -08:00
2018-09-04 21:31:43 +02:00
2018-04-12 09:41:19 -07:00
2018-08-22 10:52:45 -07:00
2017-11-09 10:23:28 +01:00
2018-07-25 13:41:22 -07:00
2018-07-21 10:43:12 -05:00
2018-08-22 10:52:46 -07:00
2018-08-02 17:33:06 -04:00
2018-08-02 17:16:05 +02:00
2019-01-31 08:14:31 +01:00
2018-05-03 15:55:23 -07:00
2018-02-06 18:32:47 -08:00
2018-11-13 11:08:51 -08:00