Several VMState descriptions restore array indices, ring heads or FIFO
lengths directly from the migration stream without re-checking the
bounds that runtime register writes enforce. If a migration stream or
snapshot carries an out-of-range value, subsequent device callbacks can
index past the corresponding array or buffer.
This series adds the missing post-load checks for Fifo8, fw_cfg,
hda-codec, Hyper-V VMBus (GPADL and rx_queue), pcie_sriov, sifive_uart,
ipoctal232, and vmmouse.
lbyxiaolizi (9):
util/fifo8: check head and num bounds in post_load
hw/nvram/fw_cfg: reset out-of-range cur_entry in post_load
hw/audio/hda-codec: mask stream and channel IDs in post_load
hw/hyperv/vmbus: check seen_gfns <= num_gfns in gpadl post_load
hw/hyperv/vmbus: check rx_queue head and size in post_load
hw/pci/pcie_sriov: clamp NumVFs to TotalVFs in register_vfs
hw/char/sifive_uart: check rx_fifo_len in post_load
hw/char/ipoctal232: check channel FIFO indices in post_load
hw/i386/vmmouse: check nb_queue bound in post_load
hw/audio/hda-codec.c | 10 ++++++++++
hw/char/ipoctal232.c | 13 +++++++++++++
hw/char/sifive_uart.c | 12 ++++++++++++
hw/hyperv/vmbus.c | 23 +++++++++++++++++++++++
hw/i386/vmmouse.c | 4 ++++
hw/nvram/fw_cfg.c | 18 ++++++++++++++++++
hw/pci/pcie_sriov.c | 7 +++++++
util/fifo8.c | 15 +++++++++++++++
8 files changed, 102 insertions(+)
base-commit: 61436f5ff1c4e5ee8f60fa1a37962a60f73ea7a4