Skip to content

Commit

Permalink
ACPICA: Added additional parameter validation for LoadTable
Browse files Browse the repository at this point in the history
Implemented additional parameter validation for the LoadTable
operator. The length of the input strings SignatureString,
OemIdString, and OemTableId are now checked for maximum
lengths.

http://www.acpica.org/bugzilla/show_bug.cgi?id=582

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Lin Ming authored and Len Brown committed Apr 22, 2008
1 parent fe4078a commit 49718b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/executer/exconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,

ACPI_FUNCTION_TRACE(ex_load_table_op);

/* Validate lengths for the signature_string, OEMIDString, OEMtable_iD */

if ((operand[0]->string.length > ACPI_NAME_SIZE) ||
(operand[1]->string.length > ACPI_OEM_ID_SIZE) ||
(operand[2]->string.length > ACPI_OEM_TABLE_ID_SIZE)) {
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

/* Find the ACPI table in the RSDT/XSDT */

status = acpi_tb_find_table(operand[0]->string.pointer,
Expand Down

0 comments on commit 49718b1

Please sign in to comment.