[PATCH] crypto: testmgr - fix length truncation with large page size

Herbert Xu herbert at gondor.apana.org.au
Thu May 30 23:41:07 AEST 2019


On Mon, May 20, 2019 at 09:47:19AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers at google.com>
> 
> On PowerPC with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, there is sometimes
> a crash in generate_random_aead_testvec().  The problem is that the
> generated test vectors use data lengths of up to about 2 * PAGE_SIZE,
> which is 128 KiB on PowerPC; however, the data length fields in the test
> vectors are 'unsigned short', so the lengths get truncated.  Fix this by
> changing the relevant fields to 'unsigned int'.
> 
> Fixes: 40153b10d91c ("crypto: testmgr - fuzz AEADs against their generic implementation")
> Signed-off-by: Eric Biggers <ebiggers at google.com>
> ---
>  crypto/testmgr.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


More information about the Linuxppc-dev mailing list