[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.19] x86/HVM: correct MMIO emulation cache bounds check
commit 15f83e27444768c60671d7b8c3fdc597c4fca563 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Feb 17 13:18:15 2025 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Feb 17 13:18:15 2025 +0100 x86/HVM: correct MMIO emulation cache bounds check To avoid overrunning the internal buffer we need to take the offset into the buffer into account. Fixes: d95da91fb497 ("x86/HVM: grow MMIO cache data size to 64 bytes") Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> master commit: e5339bb689dfa79a914c6c96e1d82d61e1ae3161 master date: 2025-01-23 11:14:48 +0100 --- xen/arch/x86/hvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 9e62b2f184..10737533ba 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -936,7 +936,7 @@ static int hvmemul_phys_mmio_access( } /* Accesses must not overflow the cache's buffer. */ - if ( size > sizeof(cache->buffer) ) + if ( offset + size > sizeof(cache->buffer) ) { ASSERT_UNREACHABLE(); return X86EMUL_UNHANDLEABLE; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |