mbox series

[RFC,0/6] hw/sd/sdcard: Do not attempt to erase out of range addresses

Message ID 20200918174117.180057-1-f4bug@amsat.org
Headers show
Series hw/sd/sdcard: Do not attempt to erase out of range addresses | expand

Message

Philippe Mathieu-Daudé Sept. 18, 2020, 5:41 p.m. UTC
Yet another bug in the sdcard model found by libfuzzer:
https://bugs.launchpad.net/bugs/1895310

The bug is fixed, but there is a migration issue to
be resolved... so posting as RFC.

Philippe Mathieu-Daudé (6):
  hw/sd/sdcard: Add trace event for ERASE command (CMD38)
  hw/sd/sdcard: Introduce the INVALID_ADDRESS definition
  hw/sd/sdcard: Do not use legal address '0' for INVALID_ADDRESS
  hw/sd/sdcard: Reset both start/end addresses on error
  hw/sd/sdcard: Do not attempt to erase out of range addresses
  hw/sd/sdcard: Assert if accessing an illegal group

 hw/sd/sd.c         | 30 ++++++++++++++++++++++--------
 hw/sd/trace-events |  2 +-
 2 files changed, 23 insertions(+), 9 deletions(-)