diff options
| author | Jean-Christophe Dubois <jcd@tribudubois.net> | 2017-01-09 11:40:23 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-01-09 11:40:23 +0000 |
| commit | 24cb2e0d57cea0cbc163f23fa47d530b35425a21 (patch) | |
| tree | 43a73f13f9bb22940a818e9e863f2bc66cd0015c /hw/net/virtio-net.c | |
| parent | 8dd845d3c434cf2c799e0f86a1b53b33057b61ab (diff) | |
| download | focaccia-qemu-24cb2e0d57cea0cbc163f23fa47d530b35425a21.tar.gz focaccia-qemu-24cb2e0d57cea0cbc163f23fa47d530b35425a21.zip | |
m25p80: don't let rogue SPI controllers cause buffer overruns
In normal operation we should never attempt to put more data into the data[] array than it can hold. However if the SPI controller connected to us misbehaves then it can send us a sequence of commands that attempt this. Since the controller might be in the guest (if the hardware does SPI via bit-banging), catch the possible overrun conditions and reset the flash internal state, logging them as guest errors. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Message-id: 20170107111631.24444-1-jcd@tribudubois.net Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: rewrote commit message to be more exact about when this can happen] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions