hw/display/ati: fix HOST_DATA accumulator overflow and bpp==0 crashes
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest2 patches 4 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/display/ati: reset host_data.next in write handler after flushhw/ hw/ | +2 | 1 reply | |
| 2/2 | hw/display/ati: guard against zero bpp in ati_host_data_flushhw/ | +5 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Chad Jablonski |
|---|---|
| Series | R-b |
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] hw/display/ati: fix HOST_DATA accumulator overflow and bpp==0 crashes
Two guest-triggerable crashes in the ati-vga HOST_DATA blit path, independently found via fuzzing (generic-fuzz with ASan/UBSan).
Patch 1 fixes the heap-buffer-overflow: when ati_host_data_flush() returns early, host_data.next was not reset, causing subsequent HOST_DATA writes to index past acc[3]. The fix moves the reset into the write handler as suggested by Chad Jablonski in the v1 discussion.
Patch 2 fixes division-by-zero (SIGFPE) and g_assert_not_reached() when ati_bpp_from_datatype() returns 0 for invalid dp_datatype values.
Based on Feifan Qian's v1 report and the subsequent design discussion between BALATON Zoltan and Chad Jablonski.
Junjie Cao (2):
hw/display/ati: reset host_data.next in write handler after flush hw/display/ati: guard against zero bpp in ati_host_data_flush
hw/display/ati.c | 2 ++ hw/display/ati_2d.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0