Skip to content
Commit be636619 authored by Eric Biggers's avatar Eric Biggers Committed by Paul Gortmaker
Browse files

crypto: testmgr - fix length truncation with large page size



commit e944eab3 upstream.

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: 40153b10 ("crypto: testmgr - fuzz AEADs against their generic implementation")
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 3b9d2aa1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment