summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/Makefile
diff options
context:
space:
mode:
authorIlya Somkin <onto1024b@gmail.com>2026-10-14 17:03:46 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-10-20 01:32:49 +0300
commit03fd4a5b397d18f8653e148900e382e44cac53ef (patch)
tree816745c0b73b073a52b5f2ef9437eacda61c764a /BaseTools/Source/C/Makefile
parentb7c4b30db2c00af9d455d64c7fc1747152729bf3 (diff)
downloadedk2-master.tar.xz
DynamicTablesPkg/AcpiSpcrLib: Fix NameSpaceString buffer overflowHEADmaster
`EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_4` ends with the flexible array member `NameSpaceString[]`, so the static `AcpiSpcr` template provides no storage for the namespace string. For SPCR revision 3 and above, `AsciiStrCpyS ()` writes `NAME_STR_SPCR_PORT` past the end of `AcpiSpcr` and corrupts the adjacent global data of the module. For revision 4 the installed table also includes those bytes, read from beyond the template. On a RISC-V platform the write overwrote the `SsdtCpuTopologyGenerator` header in `DynamicTableFactoryDxe`: its `GeneratorID` became "COM1" and the build of the SSDT CPU topology table, requested after the `SPCR`, asserted on `AcpiTableInfo->TableGeneratorId == This->GeneratorID`. Build the table in a buffer allocated with the full table size: copy the template into it, store the namespace string for revision 4 and free the buffer in `FreeSpcrTableEx ()` and on the error path. Signed-off-by: Ilya Somkin <onto1024b@gmail.com>
Diffstat (limited to 'BaseTools/Source/C/Makefile')
0 files changed, 0 insertions, 0 deletions