android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sean Christopherson a57c01c563 KVM: Check validity of resolved slot when searching memslots
commit b6467ab142b708dd076f6186ca274f14af379c72 upstream.

Check that the resolved slot (somewhat confusingly named 'start') is a
valid/allocated slot before doing the final comparison to see if the
specified gfn resides in the associated slot.  The resolved slot can be
invalid if the binary search loop terminated because the search index
was incremented beyond the number of used slots.

This bug has existed since the binary search algorithm was introduced,
but went unnoticed because KVM statically allocated memory for the max
number of slots, i.e. the access would only be truly out-of-bounds if
all possible slots were allocated and the specified gfn was less than
the base of the lowest memslot.  Commit 36947254e5f98 ("KVM: Dynamically
size memslot array based on number of used slots") eliminated the "all
possible slots allocated" condition and made the bug embarrasingly easy
to hit.

Fixes: 9c1a5d3878 ("kvm: optimize GFN to memslot lookup with large slots amount")
Reported-by: syzbot+d889b59b2bb87d4047a2@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200408064059.8957-2-sean.j.christopherson@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 17:23:11 +02:00
..
acpi ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-03-11 07:53:05 +01:00
asm-generic asm-generic: fix -Wtype-limits compiler warnings 2019-08-25 10:51:50 +02:00
clocksource
crypto crypto: vmac - separate tfm and request context 2018-08-17 20:59:29 +02:00
drm drm: mst: Fix query_payload ack reply struct 2020-01-04 13:39:00 +01:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:19:38 +01:00
keys KEYS: user: Align the payload buffer 2019-02-27 10:07:00 +01:00
kvm arm/arm64: KVM: Add PSCI version selection API 2018-05-09 09:50:19 +02:00
linux KVM: Check validity of resolved slot when searching memslots 2020-05-02 17:23:11 +02:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-21 10:41:02 +01:00
media media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-28 15:42:24 +01:00
memory
misc
net tcp: cache line align MAX_TCP_HEADER 2020-05-02 17:23:08 +02:00
pcmcia
ras
rdma IB/mlx4: Avoid implicit enumerated type conversion 2019-11-25 09:53:28 +01:00
rxrpc
scsi scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-28 15:42:54 +01:00
soc memory: tegra: Apply interrupts mask per SoC 2018-08-03 07:55:24 +02:00
sound ALSA: rawmidi: Avoid bit fields for state flags 2020-02-28 15:42:55 +01:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-24 07:59:06 +02:00
trace tracing: xen: Ordered comparison of function pointers 2020-01-29 10:24:39 +01:00
uapi coresight: do not use the BIT() macro in the UAPI header 2020-04-13 10:32:53 +02:00
video udlfb: set optimal write delay 2018-09-09 20:01:25 +02:00
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:44:05 +02:00
Kbuild