]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: octeontx - Fix authenc setkey
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 17 Aug 2024 04:13:23 +0000 (12:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:13 +0000 (12:00 +0200)
commit9e81df799b91b99b56040a4d83b60628004edc5c
tree36f8612699e5526d7440298bef4008d3bd91c288
parentda858c06f22ff355c4b4bd204a33467bb178996f
crypto: octeontx - Fix authenc setkey

[ Upstream commit 311eea7e37c4c0b44b557d0c100860a03b4eab65 ]

Use the generic crypto_authenc_extractkeys helper instead of custom
parsing code that is slightly broken.  Also fix a number of memory
leaks by moving memory allocation from setkey to init_tfm (setkey
can be called multiple times over the life of a tfm).

Finally accept all hash key lengths by running the digest over
extra-long keys.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c