linux/crypto
Stephan Mueller eea0d3ea75 crypto: drbg - set freed buffers to NULL
During freeing of the internal buffers used by the DRBG, set the pointer
to NULL. It is possible that the context with the freed buffers is
reused. In case of an error during initialization where the pointers
do not yet point to allocated memory, the NULL value prevents a double
free.

Cc: stable@vger.kernel.org
Fixes: 3cfc3b9721 ("crypto: drbg - use aligned buffers")
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Reported-by: syzbot+75397ee3df5c70164154@syzkaller.appspotmail.com
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-04-21 00:57:00 +08:00
..
asymmetric_keys kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
async_tx
842.c
ablkcipher.c
acompress.c
aead.c
aes_generic.c
aes_ti.c
af_alg.c crypto: af_alg - fix possible uninit-value in alg_bind() 2018-04-07 22:32:31 -04:00
ahash.c crypto: ahash - Fix early termination in hash walk 2018-03-31 01:34:19 +08:00
akcipher.c
algapi.c crypto: api - Keep failed instances alive 2018-03-31 01:32:58 +08:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c crypto: api - fix finding algorithm currently being tested 2018-04-21 00:24:02 +08:00
arc4.c
authenc.c
authencesn.c
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
cfb.c
chacha20_generic.c
chacha20poly1305.c
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c
crypto_null.c
crypto_user.c
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c crypto: drbg - set freed buffers to NULL 2018-04-21 00:57:00 +08:00
ecb.c
ecc.c crypto: ecc - Remove stack VLA usage 2018-03-16 23:35:53 +08:00
ecc.h
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
echainiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h crypto: api - Make crypto_alg_lookup static 2018-03-31 01:32:58 +08:00
jitterentropy-kcapi.c
jitterentropy.c
Kconfig MIPS changes for 4.17 2018-04-10 11:39:22 -07:00
keywrap.c
khazad.c
kpp.c
lrw.c crypto: lrw - Free rctx->ext with kzfree 2018-03-31 01:33:10 +08:00
lz4.c
lz4hc.c
lzo.c
Makefile kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
mcryptd.c
md4.c crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array() 2018-03-31 01:33:09 +08:00
md5.c crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array() 2018-03-31 01:33:09 +08:00
memneq.c
michael_mic.c
pcbc.c
pcrypt.c
poly1305_generic.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
rsa-pkcs1pad.c
rsa.c
rsa_helper.c kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c
scatterwalk.c
scompress.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
simd.c
skcipher.c
sm3_generic.c
sm4_generic.c
speck.c
tcrypt.c crypto: testmgr - introduce SM4 tests 2018-03-16 23:35:50 +08:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - introduce SM4 tests 2018-03-16 23:35:50 +08:00
testmgr.h crypto: testmgr - add a new test case for CRC-T10DIF 2018-03-16 23:35:53 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c