aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-06-21 08:38:29 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-06-21 09:26:16 -0700
commit418ade7849ce7641c0f7333718caf5091a02fd4c (patch)
treebe8c04dd9ffd4ec5ed0f367c815c89bd23c66989 /util
parent3f42906c9ab2c777a895b48b87b8107167e4a275 (diff)
downloadqemu-418ade7849ce7641c0f7333718caf5091a02fd4c.zip
qemu-418ade7849ce7641c0f7333718caf5091a02fd4c.tar.gz
qemu-418ade7849ce7641c0f7333718caf5091a02fd4c.tar.bz2
softmmu: Always initialize xlat in address_space_translate_for_iotlb
The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_MASK, so that the call to iotlb_to_section using the xlat'ed address returns io_mem_unassigned, as desired by the translate_fail path. It is most useful to record the original physical page address, which will eventually be logged by memory_region_access_valid when the access is rejected by unassigned_mem_accepts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1065 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220621153829.366423-1-richard.henderson@linaro.org>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions