Re: [PATCH] sunrpc: Fix RFC6803 encryption test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Apr 2023, David Howells wrote:

>     
> The usage_data[] array in rfc6803_encrypt_case() is uninitialised, so clear
> it as it may cause the tests to fail otherwise.
> 
> Fixes: b958cff6b27b ("SUNRPC: Add encryption KUnit tests for the RFC 6803 encryption types")
> Link: https://lore.kernel.org/r/380323.1681314997@xxxxxxxxxxxxxxxxxxxxxx/
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> cc: Chuck Lever <chuck.lever@xxxxxxxxxx>
> cc: Scott Mayhew <smayhew@xxxxxxxxxx>
> cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> cc: linux-nfs@xxxxxxxxxxxxxxx
> cc: linux-crypto@xxxxxxxxxxxxxxx
> ---
>  net/sunrpc/auth_gss/gss_krb5_test.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/sunrpc/auth_gss/gss_krb5_test.c b/net/sunrpc/auth_gss/gss_krb5_test.c
> index ce0541e32fc9..aa6ec4e858aa 100644
> --- a/net/sunrpc/auth_gss/gss_krb5_test.c
> +++ b/net/sunrpc/auth_gss/gss_krb5_test.c
> @@ -1327,6 +1327,7 @@ static void rfc6803_encrypt_case(struct kunit *test)
>  	if (!gk5e)
>  		kunit_skip(test, "Encryption type is not available");
>  
> +	memset(usage_data, 0, sizeof(usage_data));
>  	usage.data[3] = param->constant;
>  
>  	Ke.len = gk5e->Ke_length;
> 

I still see the failures with this patch applied.  The rfc6803 checksum
tests run before the rfc6803 encryption tests, so I'm not sure how this
would help.

-Scott




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux