summary refs log tree commit diff stats
path: root/python/qemu/aqmp/error.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-01-11 17:10:48 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-01-20 16:04:58 +0000
commit58b88779f00707b6231d827637b5a3d498f9fe28 (patch)
tree7f1450f1c1cb00ab8a5ed305d6fd9c593930c19f /python/qemu/aqmp/error.py
parentb13148d91805143aba3e0b4441e760b9bea03b8c (diff)
downloadfocaccia-qemu-58b88779f00707b6231d827637b5a3d498f9fe28.tar.gz
focaccia-qemu-58b88779f00707b6231d827637b5a3d498f9fe28.zip
hw/intc/arm_gicv3_its: Range-check ICID before indexing into collection table
In process_its_cmd(), we read an ICID out of the interrupt table
entry, and then use it as an index into the collection table.  Add a
check that it is within range for the collection table first.

This check is not strictly necessary, because:
 * we range check the ICID from the guest before writing it into
   the interrupt table entry, so the the only way to get an
   out of range ICID in process_its_cmd() is if a badly-behaved
   guest is writing directly to the interrupt table memory
 * the collection table is in guest memory, so QEMU won't fall
   over if we read off the end of it

However, it seems clearer to include the check.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20220111171048.3545974-14-peter.maydell@linaro.org
Diffstat (limited to 'python/qemu/aqmp/error.py')
0 files changed, 0 insertions, 0 deletions