ACK: [PATCH] acpi: gtdt: fix buffer overrun comparison (for SBSA)

Alex Hung alex.hung at canonical.com
Fri Apr 1 09:05:08 UTC 2016


On 03/30/2016 11:57 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The check to see if we overrun the data buffer is incorrect, the
> comparison is currently the wrong way around. Thanks to Sunil V L
> for finding and reporting this bug.
>
> Reported-by: Sunil V L <sunil.vl at hpe.com>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/gtdt/gtdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/gtdt/gtdt.c b/src/acpi/gtdt/gtdt.c
> index 1c98185..b5ee280 100644
> --- a/src/acpi/gtdt/gtdt.c
> +++ b/src/acpi/gtdt/gtdt.c
> @@ -181,7 +181,7 @@ static int gtdt_test1(fwts_framework *fw)
>   		case 0x01:
>   			/* SBSA Generic Watchdog Timer Structure */
>   			watchdog = (fwts_acpi_table_gtdt_watchdog *)ptr;
> -			if (ptr + 28 < end_ptr) {
> +			if (ptr + 28 > end_ptr) {
>   				passed = false;
>   				fwts_failed(fw, LOG_LEVEL_HIGH,
>   					"GTDTShortWatchDogTimer",
>

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list