ACK: [PATCH 2/2] acpi/iort: fix error in SMMU node length check

ivanhu ivan.hu at canonical.com
Fri Feb 22 13:28:37 UTC 2019


On 2/20/19 9:59 PM, Ard Biesheuvel wrote:
> The SMMU v1/v2 global interrupt check tries to ensure that the global
> interrupt sub-table does not extend beyond the end of the table, but
> the actual expression being compared accounts fpr the size of the
> table twice, resulting in false negatives.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> ---
>  src/acpi/iort/iort.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/iort/iort.c b/src/acpi/iort/iort.c
> index 5e46fabbfccb..ce8306631450 100644
> --- a/src/acpi/iort/iort.c
> +++ b/src/acpi/iort/iort.c
> @@ -305,7 +305,7 @@ static void iort_smmu_global_interrupt_check(
>  	uint8_t *intr_end = data + offset +
>  			sizeof(fwts_acpi_table_iort_smmu_global_interrupt_array);
>  
> -	if (sizeof(*intr) + (uint8_t *)intr_end > data_end) {
> +	if (intr_end > data_end) {
>  		*passed = false;
>  		fwts_failed(fw, LOG_LEVEL_HIGH,
>  			"IORTSmmuGlobalInterruptsOutsideTable",


Acked-by: Ivan Hu <ivan.hu at canonical.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20190222/08b5e752/attachment.sig>


More information about the fwts-devel mailing list