[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/8] ati-vga: Do not allow unaligned access via index register
From: |
Gerd Hoffmann |
Subject: |
[PULL 1/8] ati-vga: Do not allow unaligned access via index register |
Date: |
Mon, 18 May 2020 17:12:48 +0200 |
From: BALATON Zoltan <address@hidden>
According to docs bits 1 and 0 of MM_INDEX are hard coded to 0 so
unaligned access via this register should not be possible.
This also fixes problems reported in bug #1878134.
Buglink: https://bugs.launchpad.net/qemu/+bug/1878134
Signed-off-by: BALATON Zoltan <address@hidden>
Tested-by: Alexander Bulekov <address@hidden>
Acked-by: Alexander Bulekov <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/display/ati.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/ati.c b/hw/display/ati.c
index 58ec8291d460..065f197678e4 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -511,7 +511,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
}
switch (addr) {
case MM_INDEX:
- s->regs.mm_index = data;
+ s->regs.mm_index = data & ~3;
break;
case MM_DATA ... MM_DATA + 3:
/* indexed access to regs or memory */
--
2.18.4
- [PULL 0/8] Vga 20200518 patches, Gerd Hoffmann, 2020/05/18
- [PULL 3/8] Revert "hw/display/ramfb: initialize fw-config space with xres/ yres", Gerd Hoffmann, 2020/05/18
- [PULL 8/8] ramfb: fix size calculation, Gerd Hoffmann, 2020/05/18
- [PULL 5/8] ramfb: drop leftover debug message, Gerd Hoffmann, 2020/05/18
- [PULL 7/8] ramfb: add sanity checks to ramfb_create_display_surface, Gerd Hoffmann, 2020/05/18
- [PULL 2/8] hw/display: Include local 'framebuffer.h', Gerd Hoffmann, 2020/05/18
- [PULL 1/8] ati-vga: Do not allow unaligned access via index register,
Gerd Hoffmann <=
- [PULL 4/8] Revert "hw/display/ramfb: lock guest resolution after it's set", Gerd Hoffmann, 2020/05/18
- [PULL 6/8] ramfb: don't update RAMFBState on errors, Gerd Hoffmann, 2020/05/18
- Re: [PULL 0/8] Vga 20200518 patches, Peter Maydell, 2020/05/18