qemu-e2k/docs/system
Peter Maydell 3a9163af4e Fix CVE-2020-13253
By using invalidated address, guest can do out-of-bounds accesses.
 These patches fix the issue by only allowing SD card image sizes
 power of 2, and not switching to SEND_DATA state when the address
 is invalid (out of range).
 
 This issue was found using QEMU fuzzing mode (using --enable-fuzzing,
 see docs/devel/fuzzing.txt) and reported by Alexander Bulekov.
 
 Reproducer:
   https://bugs.launchpad.net/qemu/+bug/1880822/comments/1
 
 CI jobs results:
 . https://cirrus-ci.com/build/5157142548185088
 . https://gitlab.com/philmd/qemu/-/pipelines/166381731
 . https://travis-ci.org/github/philmd/qemu/builds/707956535
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAl8NuSQACgkQ4+MsLN6t
 wN7MEg/+PER/n+CpmrC2lggQ3WJwNjvY09A4yfPfhKldjOi+25/amf/bQ2Zjmj7m
 HoiiPFu7vz+FugOfGv5YFlTS2+VNmN1UZqGqZRwY/YJJKg9am6TJ8zA4UBf4iegi
 OqNBJOPW/EYsAYdH3jUFmW15zAsRHEM6g2vZ1Z4WwVZqfYHsMB/y2khp9Fr+jGU0
 6wDeG0cdap5QVsamIll4/BoxgBa5UdtBYjzo7QBENs+abvOf56jjUqZx0+AL/Ua/
 IOpZ01mmPZJ4wJxPNT87gfEnHv0MRA7bSpJ7TAC80xVoQjeoK+V2Ohvy+rvYPaqm
 5mR0l4M+GGhglCg44wV3uwNonmltCxvTgGqZrQPsa3WnXMFoXqwGZgwl6XrYdLzV
 hVODJAu/Ivegk9AAbVrZGXg/shQtkB4gyoOaE3Qoraf1az9/XudECIo+zwocP4Ip
 Z0ny8bwQKq2QGYrCU3NWlgWi30sj6PeW5e6Jgq/2b1sUeKuUgNuuBPcRmXQ6kaz5
 vMX7qYsXAxvO7o1QlbASzdvSvOXGx+0J0CJctPnY4jAJ7qjvJTKOb0j+jwMNJy+D
 XFAgB+D0go+UvnaPJn6teIHzaD4NqWE37MaamxsMY6RWjAnoy1+OOvZIZTnq+LnH
 iLbgk2EsxlFyBd3aZ/51ukeTUxpNgu9J6iRcXB3yVNBS4vqlBDw=
 =VZsF
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/philmd-gitlab/tags/sdcard-CVE-2020-13253-pull-request' into staging

Fix CVE-2020-13253

By using invalidated address, guest can do out-of-bounds accesses.
These patches fix the issue by only allowing SD card image sizes
power of 2, and not switching to SEND_DATA state when the address
is invalid (out of range).

This issue was found using QEMU fuzzing mode (using --enable-fuzzing,
see docs/devel/fuzzing.txt) and reported by Alexander Bulekov.

Reproducer:
  https://bugs.launchpad.net/qemu/+bug/1880822/comments/1

CI jobs results:
. https://cirrus-ci.com/build/5157142548185088
. https://gitlab.com/philmd/qemu/-/pipelines/166381731
. https://travis-ci.org/github/philmd/qemu/builds/707956535

# gpg: Signature made Tue 14 Jul 2020 14:54:44 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/sdcard-CVE-2020-13253-pull-request:
  hw/sd/sdcard: Do not switch to ReceivingData if address is invalid
  hw/sd/sdcard: Update coding style to make checkpatch.pl happy
  hw/sd/sdcard: Do not allow invalid SD card sizes
  hw/sd/sdcard: Simplify realize() a bit
  hw/sd/sdcard: Restrict Class 6 commands to SCSD cards
  tests/acceptance/boot_linux: Expand SD card image to power of 2
  tests/acceptance/boot_linux: Tag tests using a SD card with 'device:sd'
  docs/orangepi: Add instructions for resizing SD image to power of two
  MAINTAINERS: Cc qemu-block mailing list

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-07-15 09:06:55 +01:00
..
arm docs/orangepi: Add instructions for resizing SD image to power of two 2020-07-14 15:38:22 +02:00
s390x docs/system/s390x: Improve the 3270 documentation 2020-07-13 11:40:52 +02:00
build-platforms.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
conf.py docs: Generate qemu.1 manpage with Sphinx 2020-03-06 11:06:55 +00:00
cpu-models-mips.rst.inc docs/system: Convert qemu-cpu-models.texi to rST 2020-03-06 10:05:12 +00:00
cpu-models-x86.rst.inc qemu-cpu-models.rst: Document -noTSX, mds-no, taa-no, and tsx-ctrl 2020-03-16 23:02:25 +01:00
deprecated.rst qemu-img: Deprecate use of -b without -F 2020-07-14 15:24:05 +02:00
device-url-syntax.rst.inc docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
gdb.rst docs: Add to gdbstub documentation the PhyMemMode 2020-07-11 15:53:00 +01:00
images.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
index.rst Documentation: create/move s390x documentation 2020-03-23 12:36:27 +01:00
invocation.rst docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
ivshmem.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
keys.rst docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
keys.rst.inc docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
license.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
linuxboot.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
managed-startup.rst docs/system: convert managed startup to rST. 2020-03-06 10:05:12 +00:00
monitor.rst hmp-commands-info.hx: Add rST documentation fragments 2020-03-06 10:05:12 +00:00
mux-chardev.rst docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
mux-chardev.rst.inc docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
net.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
qemu-block-drivers.rst docs: Create defs.rst.inc as a place to define substitutions 2020-03-06 10:04:58 +00:00
qemu-block-drivers.rst.inc docs/system: put qemu-block-drivers body in an included file 2020-03-06 10:04:58 +00:00
qemu-cpu-models.rst docs/system: Convert qemu-cpu-models.texi to rST 2020-03-06 10:05:12 +00:00
qemu-manpage.rst docs: Generate qemu.1 manpage with Sphinx 2020-03-06 11:06:55 +00:00
quickstart.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
security.rst docs/system: Convert security.texi to rST format 2020-03-06 10:05:12 +00:00
target-arm.rst docs/system: Document Aspeed boards 2020-06-05 17:23:09 +01:00
target-avr.rst target/avr: Add section into QEMU documentation 2020-07-11 11:02:05 +02:00
target-i386-desc.rst.inc pcspk: update docs/system/target-i386-desc.rst.inc 2020-07-06 17:01:11 +02:00
target-i386.rst docs: Split out sections for the manpage into .rst.inc files 2020-03-06 11:06:55 +00:00
target-m68k.rst docs: Roll semihosting option information into qemu-options.hx 2020-03-06 10:05:12 +00:00
target-mips.rst hw/mips/fuloong2e: Fix typo in Fuloong machine name 2020-05-26 13:20:48 +02:00
target-ppc.rst docs: Roll -prom-env and -g target-specific info into qemu-options.hx 2020-03-06 10:05:18 +00:00
target-rx.rst docs: Document the RX target 2020-06-22 18:37:12 +02:00
target-s390x.rst docs/s390x: document vfio-ccw 2020-06-05 17:13:11 +02:00
target-sparc.rst docs: Roll -prom-env and -g target-specific info into qemu-options.hx 2020-03-06 10:05:18 +00:00
target-sparc64.rst docs: Roll -prom-env and -g target-specific info into qemu-options.hx 2020-03-06 10:05:18 +00:00
target-xtensa.rst docs: Roll semihosting option information into qemu-options.hx 2020-03-06 10:05:12 +00:00
targets.rst target/avr: Add section into QEMU documentation 2020-07-11 11:02:05 +02:00
tls.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
usb.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
vnc-security.rst docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00