summaryrefslogtreecommitdiff
path: root/crypto/ghash-generic.c
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2020-08-12 14:58:25 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-08-13 17:09:32 +1000
commit39709b59769d024936bdb204d0b49a6ae9d83b3e (patch)
treed2268cb31c89c485e51d6d81088558d7aa0e67d4 /crypto/ghash-generic.c
parent18614fdea411d506ee302d4f16adcc095f0246cd (diff)
downloadlinux-crypto-39709b59769d024936bdb204d0b49a6ae9d83b3e.tar.gz
linux-crypto-39709b59769d024936bdb204d0b49a6ae9d83b3e.zip
crypto: algif_aead - fix uninitialized ctx->init
In skcipher_accept_parent_nokey() the whole af_alg_ctx structure is cleared by memset() after allocation, so add such memset() also to aead_accept_parent_nokey() so that the new "init" field is also initialized to zero. Without that the initial ctx->init checks might randomly return true and cause errors. While there, also remove the redundant zero assignments in both functions. Found via libkcapi testsuite. Cc: Stephan Mueller <smueller@chronox.de> Fixes: a52eb0489f96 ("crypto: algif_aead - Only wake up when ctx->more is zero") Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ghash-generic.c')
0 files changed, 0 insertions, 0 deletions