ACK: [PATCH] uefirtauthvar: missing return error when mismatch size of set/get test data

Alex Hung alex.hung at canonical.com
Thu Mar 5 06:48:57 UTC 2015


On 03/05/2015 01:18 PM, Ivan Hu wrote:
> CoverityScan detected a potential buffer overflow, it is because that mismatch
> of set and get authenticated variable, this should directly set as ERROR and
> return. And no need to compare the further data contents.
> 
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/uefi/uefirtauthvar/uefirtauthvar.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c
> index 22c954b..3f696ec 100644
> --- a/src/uefi/uefirtauthvar/uefirtauthvar.c
> +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c
> @@ -415,6 +415,7 @@ static int uefirtauthvar_test5(fwts_framework *fw)
>  			"UEFIUpdateAuthVar",
>  			"Get authenticated variable data size is not the "
>  			"same as it set.");
> +		return FWTS_ERROR;
>  	}
>  
>  	for (i = 0; i < getdatasize; i++) {
> 

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



More information about the fwts-devel mailing list