summaryrefslogtreecommitdiff
path: root/crypto/sm3_generic.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-01-06 12:46:05 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-10 21:37:31 +0800
commit4155904c16770af1d62b86aafef09003ae316092 (patch)
tree057f297da924999cba9a3e4ed5255baa47eb5fd6 /crypto/sm3_generic.c
parent30cbeb72dd5e44c299143da875af0544ec9db980 (diff)
downloadlinux-crypto-4155904c16770af1d62b86aafef09003ae316092.tar.gz
linux-crypto-4155904c16770af1d62b86aafef09003ae316092.zip
crypto: adiantum - initialize crypto_spawn::inst
crypto_grab_*() doesn't set crypto_spawn::inst, so templates must set it beforehand. Otherwise it will be left NULL, which causes a crash in certain cases where algorithms are dynamically loaded/unloaded. E.g. with CONFIG_CRYPTO_CHACHA20_X86_64=m, the following caused a crash: insmod chacha-x86_64.ko python -c 'import socket; socket.socket(socket.AF_ALG, 5, 0).bind(("skcipher", "adiantum(xchacha12,aes)"))' rmmod chacha-x86_64.ko python -c 'import socket; socket.socket(socket.AF_ALG, 5, 0).bind(("skcipher", "adiantum(xchacha12,aes)"))' Fixes: 2fefad9112f3 ("crypto: adiantum - add Adiantum support") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/sm3_generic.c')
0 files changed, 0 insertions, 0 deletions