mirror_edk2/ShellPkg/Library/UefiShellAcpiViewCommandLib
Krzysztof Koch 62cefaf44e ShellPkg: acpiview: IORT: Prevent buffer overruns
Modify the IORT table parsing logic to prevent reading past the buffer
lengths provided.

Change DumpIortNodeIdMappings() function's signature and implementation
to simplify buffer overrun prevention. Update all calls to this
function accordingly.

Modify the parser for each type of IORT node such that the offset from
the start of the node's buffer is tracked as the parsing function is
executed. Again, this change helps prevent buffer overruns.

Test that the IORT node buffer fits in the table buffer before the
node's buffer contents are dumped.

References:
- IO Remapping Table (Issue D), Platform Design Document, March 2018

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@inte.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2019-08-12 10:13:49 -07:00
..
Parsers ShellPkg: acpiview: IORT: Prevent buffer overruns 2019-08-12 10:13:49 -07:00
AcpiParser.c ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct() 2019-07-31 09:52:43 -07:00
AcpiParser.h ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct() 2019-07-31 09:52:43 -07:00
AcpiTableParser.c ShellPkg: acpiview: Allow disabling consistency checks (-q flag) 2019-07-02 17:22:45 +08:00
AcpiTableParser.h ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
AcpiView.c ShellPkg: acpiview: Make '-h' option not require a parameter 2019-07-02 17:22:46 +08:00
AcpiView.h ShellPkg: acpiview: Allow disabling consistency checks (-q flag) 2019-07-02 17:22:45 +08:00
UefiShellAcpiViewCommandLib.c ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellAcpiViewCommandLib.h ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellAcpiViewCommandLib.inf ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellAcpiViewCommandLib.uni ShellPkg: acpiview: Make '-h' option not require a parameter 2019-07-02 17:22:46 +08:00