Skip to content

Commit d3c944f

Browse files
author
Lv Zheng
committed
Tables: Do not validate signature for dynamic table load
Windows seems to allow arbitrary table signatures for Load/LoadTable opcodes: ACPI BIOS Error (bug): Table has invalid signature [PRAD] (0x44415250) So this patch removes dynamic load signature checks. However we need to find a way to avoid table loading against tables like MADT. This is not covered by this commit. This Windows behavior has been validated on link #1. An end user bug report can also be found on link #2. This patch also includes simple cleanup for static load signature check code. Reported by Ye Xiaolong, Fixed by Lv Zheng. Link: #121 [#1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=118601 [#2] Reported-by: Ye Xiaolong <xiaolong.ye@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
1 parent 4551f51 commit d3c944f

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

source/components/tables/tbinstal.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -351,32 +351,6 @@ AcpiTbInstallStandardTable (
351351

352352
if (Reload)
353353
{
354-
/*
355-
* Validate the incoming table signature.
356-
*
357-
* 1) Originally, we checked the table signature for "SSDT" or "PSDT".
358-
* 2) We added support for OEMx tables, signature "OEM".
359-
* 3) Valid tables were encountered with a null signature, so we just
360-
* gave up on validating the signature, (05/2008).
361-
* 4) We encountered non-AML tables such as the MADT, which caused
362-
* interpreter errors and kernel faults. So now, we once again allow
363-
* only "SSDT", "OEMx", and now, also a null signature. (05/2011).
364-
*/
365-
if ((NewTableDesc.Signature.Ascii[0] != 0x00) &&
366-
(!ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) &&
367-
(strncmp (NewTableDesc.Signature.Ascii, "OEM", 3)))
368-
{
369-
ACPI_BIOS_ERROR ((AE_INFO,
370-
"Table has invalid signature [%4.4s] (0x%8.8X), "
371-
"must be SSDT or OEMx",
372-
AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
373-
NewTableDesc.Signature.Ascii : "????",
374-
NewTableDesc.Signature.Integer));
375-
376-
Status = AE_BAD_SIGNATURE;
377-
goto UnlockAndExit;
378-
}
379-
380354
/* Check if table is already registered */
381355

382356
for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)

source/components/tables/tbxfload.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ AcpiTbLoadNamespace (
336336
{
337337
Table = &AcpiGbl_RootTableList.Tables[i];
338338

339-
if (!AcpiGbl_RootTableList.Tables[i].Address ||
339+
if (!Table->Address ||
340340
(!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
341341
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
342342
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
343-
ACPI_FAILURE (AcpiTbValidateTable (Table)))
343+
ACPI_FAILURE (AcpiTbValidateTable (Table)))
344344
{
345345
continue;
346346
}

0 commit comments

Comments
 (0)