audk/ShellPkg
Krzysztof Koch b85048261a ShellPkg: acpiview: Prevent infinite loop if structure length is 0
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2534

Extend validation of ACPI structure lengths which are read from the
ACPI table being parsed. Additionally check if the structure 'Length'
field value is positive. If not, stop parsing the faulting table.

Some ACPI tables define internal structures of variable size. The
'Length' field inside the substructure is used to update a pointer used
for table traversal. If the byte-length of the structure is equal to 0,
acpiview can enter an infinite loop. This condition can occur if, for
example, the zero-allocated ACPI table buffer is not fully populated.
This is typically a bug on the ACPI table writer side.

In short, this method helps acpiview recover gracefully from a
zero-valued ACPI structure length.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2020-02-20 09:27:00 +00:00
..
Application ShellPkg: Document UpdateArgcArgv returns EFI_INVALID_PARAMETER 2020-02-11 02:12:45 +00:00
DynamicCommand ShellPkg/DynamicCommand: Fix various typos 2020-02-10 22:30:07 +00:00
Include ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00
Library ShellPkg: acpiview: Prevent infinite loop if structure length is 0 2020-02-20 09:27:00 +00:00
ShellPkg.ci.yaml ShellPkg: Add YAML file for CI builds 2019-11-11 13:02:34 -08:00
ShellPkg.dec ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
ShellPkg.dsc ShellPkg/ShellPkg.dsc AARCH64: enable stack protector 2019-09-05 10:19:35 -07:00