qemu/hw/smbios
Daniel P. Berrangé 10c3666658 hw/smbios: report error if table size is too large
The SMBIOS 2.1 entry point uses a uint16 data type for reporting the
total length of the tables. If the user passes -smbios configuration to
QEMU that causes the table size to exceed this limit then various bad
behaviours result, including

 - firmware hangs in an infinite loop
 - firmware triggers a KVM crash on bad memory access
 - firmware silently discards user's SMBIOS data replacing it with
   a generic data set.

Limiting the size to 0xffff in QEMU avoids triggering most of these
problems. There is a remaining bug in SeaBIOS which tries to prepend its
own data for table 0, and does not check whether there is sufficient
space before attempting this.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200923133804.2089190-3-berrange@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-09-29 02:15:24 -04:00
..
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
meson.build meson: convert hw/smbios 2020-08-21 06:30:25 -04:00
smbios-stub.c hw/smbios: Move to the hw/firmware/ subdirectory 2018-12-19 16:48:16 -05:00
smbios.c hw/smbios: report error if table size is too large 2020-09-29 02:15:24 -04:00
smbios_build.h hw/smbios: Remove "smbios_ipmi.h" 2018-12-19 16:48:16 -05:00
smbios_type_38-stub.c hw/smbios: Remove "smbios_ipmi.h" 2018-12-19 16:48:16 -05:00
smbios_type_38.c smbios:ipmi: Ignore IPMI devices with no fwinfo function 2019-09-20 14:08:10 -05:00