ACPICA: Update parameter validation for data_table_region and load_table
ACPICA commit 51ab555e60b4a3de3cc4a846e86d0de255be441a Add additional validation for the table signature and the OEM strings. Eliminates buffer read overrun in data_table_region. ACPICA BZ 1184. Link: https://bugs.acpica.org/show_bug.cgi?id=1184 Link: https://github.com/acpica/acpica/commit/51ab555e Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
这个提交包含在:
@@ -412,3 +412,36 @@ next_table:
|
||||
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_is_valid_signature
|
||||
*
|
||||
* PARAMETERS: signature - Sig string to be validated
|
||||
*
|
||||
* RETURN: TRUE if signature is correct length and has valid characters
|
||||
*
|
||||
* DESCRIPTION: Validate an ACPI table signature.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
u8 acpi_is_valid_signature(char *signature)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
/* Validate the signature length */
|
||||
|
||||
if (strlen(signature) != ACPI_NAME_SIZE) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
/* Validate each character in the signature */
|
||||
|
||||
for (i = 0; i < ACPI_NAME_SIZE; i++) {
|
||||
if (!acpi_ut_valid_acpi_char(signature[i], i)) {
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
在新工单中引用
屏蔽一个用户