]> git.proxmox.com Git - mirror_edk2.git/commit
ShellPkg: acpiview: SRAT: Prevent buffer overruns
authorKrzysztof Koch <krzysztof.koch@arm.com>
Thu, 1 Aug 2019 23:44:07 +0000 (16:44 -0700)
committerJaben Carsey <jaben.carsey@intel.com>
Mon, 12 Aug 2019 17:14:07 +0000 (10:14 -0700)
commit48d5d6d5e09e5089d1c95c2d0812449e87f4ef7e
treeae67da57cb1c84d2c18f5087bc89d91df819cf10
parent5f0661220cdd3facf05276a9978ad58add9fe2f5
ShellPkg: acpiview: SRAT: Prevent buffer overruns

Modify the SRAT parsing logic to prevent reading past the table buffer
length provided.

Check if the Static Resource Allocation Structure's buffer fits in the
SRAT table buffer before its contents are dumped.

Prevent buffer overruns when reading the Static Resource Allocation
Structure's header.

References:
- ACPI 6.3, January 2019, Section 5.2.16

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>
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c