linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: Fix out-of-bounds memslot access
@ 2020-04-08  6:40 Sean Christopherson
  2020-04-08  6:40 ` [PATCH 1/2] KVM: Check validity of resolved slot when searching memslots Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Sean Christopherson @ 2020-04-08  6:40 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank, Paolo Bonzini
  Cc: David Hildenbrand, Cornelia Huck, kvm, linux-kernel,
	syzbot+d889b59b2bb87d4047a2

Two fixes for what are effectively the same bug.  The binary search used
for memslot lookup doesn't check the resolved index and can access memory
beyond the end of the memslot array.

I split the s390 specific change to a separate patch because it's subtly
different, and to simplify backporting.  The KVM wide fix can be applied
to stable trees as is, but AFAICT the s390 change would need to be paired
with the !used_slots check from commit 774a964ef56 ("KVM: Fix out of range
accesses to memslots").  This is why I tagged only the KVM wide patch for
stable.

Sean Christopherson (2):
  KVM: Check validity of resolved slot when searching memslots
  KVM: s390: Return last valid slot if approx index is out-of-bounds

 arch/s390/kvm/kvm-s390.c | 3 +++
 include/linux/kvm_host.h | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-04-08 14:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08  6:40 [PATCH 0/2] KVM: Fix out-of-bounds memslot access Sean Christopherson
2020-04-08  6:40 ` [PATCH 1/2] KVM: Check validity of resolved slot when searching memslots Sean Christopherson
2020-04-08  7:04   ` Cornelia Huck
2020-04-08  6:40 ` [PATCH 2/2] KVM: s390: Return last valid slot if approx index is out-of-bounds Sean Christopherson
2020-04-08  7:10   ` Cornelia Huck
2020-04-08  9:08     ` Paolo Bonzini
2020-04-08  7:28   ` Christian Borntraeger
2020-04-08 10:21   ` Claudio Imbrenda
2020-04-08 11:33     ` Paolo Bonzini
2020-04-08 11:40       ` Christian Borntraeger
2020-04-08  6:55 ` [PATCH 0/2] KVM: Fix out-of-bounds memslot access Christian Borntraeger
2020-04-08  7:24 ` Christian Borntraeger
2020-04-08  8:10   ` Cornelia Huck
2020-04-08 14:23     ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).