audk/ShellPkg/Library
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
..
UefiHandleParsingLib ShellPkg/UefiHandleParsingLib: Fix error allocate pool 2019-12-05 06:12:36 +00:00
UefiShellAcpiViewCommandLib ShellPkg: acpiview: Prevent infinite loop if structure length is 0 2020-02-20 09:27:00 +00:00
UefiShellBcfgCommandLib ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00
UefiShellCEntryLib ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellCommandLib ShellPkg/CommandLib: Use first found UC for unsupported PlatformLang 2019-11-08 08:29:58 +08:00
UefiShellDebug1CommandsLib ShellPkg/edit: typo "%d Lines Wrote" 2019-12-05 06:12:36 +00:00
UefiShellDriver1CommandsLib ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00
UefiShellInstall1CommandsLib ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellLevel1CommandsLib ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00
UefiShellLevel2CommandsLib ShellPkg/Ls: Return empty content for all empty folders 2019-11-04 10:46:02 +08:00
UefiShellLevel3CommandsLib ShellPkg: stop taking EFI_HANDLE in place of SHELL_FILE_HANDLE 2019-10-09 09:40:10 +02:00
UefiShellLib ShellPkg/UefiShellLib: clarify workaround for unfixable EdkShell bug 2019-10-09 09:40:10 +02:00
UefiShellNetwork1CommandsLib ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00
UefiShellNetwork2CommandsLib ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE 2019-10-09 09:40:10 +02:00