ANDROID: KVM: arm64: Fix ToCToU issue when refilling the hyp memcache
Xiling reports that the hypervisor dereferences the host memcache struct twice when refilling its own memcache. This allows the host to change its memcache head after it has been admitted and before it is consumed, leading to an arbitrary write in hypervisor memory. Fix this by copying the host memcache on the stack before starting to refill hence guaranteeing its stability. Bug: 228435321 Reported-by:Xiling Gong <xiling@google.com> Signed-off-by:
Quentin Perret <qperret@google.com> Change-Id: Ib7c5db203e4a4a7f27eb9f0c0083f4b5c726b4d9
Loading
Please sign in to comment