accel/tcg: fix crash on instruction straddling address-space end
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | accel/tcg: fix crash on instruction straddling address-space endaccel/ | +8 | 0 replies | |
| 2/2 | tests/multiboot: add regression test for translator_ld wraparoundtests/ tests/ tests/ +1 more | +64 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] accel/tcg: fix crash on instruction straddling address-space end
From: Tao Cui <[email protected]>
translator_ld() asserts that a page-crossing instruction reads its two pages from virtually-contiguous addresses (page0 + TARGET_PAGE_SIZE). On 32-bit targets a guest can defeat this by executing an instruction at the very end of the address space, which wraps the second page back to the start; the assert fires and QEMU aborts. This is a guest-triggered host crash (DoS).
Patch 1 takes the second page from pc when the linear page0 + TARGET_PAGE_SIZE does not land on pc's page, handling both the normal contiguous case and the wraparound case without needing the address-space width.
Patch 2 adds a multiboot regression test (tests/multiboot/wraparound) that runs on qemu-system-i386 and aborts without the fix.
Tao Cui (2):
accel/tcg: fix crash on instruction straddling address-space end tests/multiboot: add regression test for translator_ld wraparound
accel/tcg/translator.c | 16 ++++++------ tests/multiboot/Makefile | 7 +++++- tests/multiboot/run_test.sh | 8 +++++- tests/multiboot/wraparound.c | 46 ++++++++++++++++++++++++++++++++++ tests/multiboot/wraparound.out | 5 ++++ 5 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 tests/multiboot/wraparound.c create mode 100644 tests/multiboot/wraparound.out
Signature · 1 line
2.43.0