kernel_optimize_test/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 crypto: aead - prevent using AEADs without setting key 2018-01-12 23:03:39 +11:00
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 crypto: aead - prevent using AEADs without setting key 2018-01-12 23:03:39 +11:00
algif_hash.c crypto: hash - prevent using keyed hashes without setting key 2018-01-12 23:03:37 +11:00
algif_rng.c
algif_skcipher.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-31 14:22:45 -08:00
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 crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2() 2017-12-22 19:29:08 +11:00
authencesn.c crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2() 2017-12-22 19:29:08 +11:00
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast_common.c
cast5_generic.c
cast6_generic.c
cbc.c
ccm.c
cfb.c crypto: cfb - add support for Cipher FeedBack mode 2018-03-09 22:45:49 +08:00
chacha20_generic.c
chacha20poly1305.c crypto: chacha20poly1305 - validate the digest size 2017-12-22 19:02:33 +11:00
cipher.c
cmac.c
compress.c
crc32_generic.c crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
crc32c_generic.c crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
crypto_engine.c crypto: engine - Permit to enqueue all async requests 2018-02-15 23:26:50 +08:00
crypto_null.c
crypto_user.c crypto: user - Replace GFP_ATOMIC with GFP_KERNEL in crypto_report 2018-02-15 23:26:47 +08:00
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
dh_helper.c
dh.c
drbg.c crypto: drbg - set freed buffers to NULL 2018-04-21 00:57:00 +08:00
ecb.c
ecc_curve_defs.h
ecc.c crypto: ecc - Remove stack VLA usage 2018-03-16 23:35:53 +08:00
ecc.h
ecdh_helper.c
ecdh.c crypto: ecdh - fix to allow multi segment scatterlists 2018-03-09 22:45:49 +08:00
echainiv.c crypto: echainiv - Remove unused alg/spawn variable 2017-12-22 19:52:45 +11:00
fcrypt.c
fips.c
gcm.c crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2() 2017-12-22 19:29:08 +11:00
gf128mul.c crypto: gf128mul - remove incorrect comment 2017-12-22 19:52:40 +11:00
ghash-generic.c crypto: ghash - remove checks for key being set 2018-01-12 23:03:38 +11:00
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 crypto: mcryptd - remove pointless wrapper functions 2018-02-15 23:26:45 +08:00
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 crypto: pcrypt - fix freeing pcrypt instances 2017-12-22 19:02:47 +11:00
poly1305_generic.c crypto: poly1305 - remove ->setkey() method 2018-01-12 23:03:14 +11:00
proc.c crypto: algapi - convert cra_refcnt to refcount_t 2018-01-05 18:43:09 +11:00
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
rsa_helper.c kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - Replace GFP_ATOMIC with GFP_KERNEL in pkcs1pad_encrypt_sign_complete 2018-02-15 23:26:47 +08:00
rsa.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: salsa20 - export generic helpers 2018-01-12 23:03:42 +11:00
scatterwalk.c
scompress.c crypto: scompress - use sgl_alloc() and sgl_free() 2018-01-06 09:18:00 -07:00
seed.c
seqiv.c crypto: seqiv - Remove unused alg/spawn variable 2017-12-22 19:52:45 +11:00
serpent_generic.c
sha1_generic.c
sha3_generic.c mn10300: Remove the architecture 2018-03-09 23:19:56 +01:00
sha256_generic.c
sha512_generic.c
shash.c crypto: hash - prevent using keyed hashes without setting key 2018-01-12 23:03:37 +11:00
simd.c crypto: simd - allow registering multiple algorithms at once 2018-03-03 00:03:17 +08:00
skcipher.c crypto: skcipher - prevent using skciphers without setting key 2018-01-12 23:03:39 +11:00
sm3_generic.c
sm4_generic.c crypto: sm4 - introduce SM4 symmetric cipher algorithm 2018-03-16 23:35:48 +08:00
speck.c crypto: speck - export common helpers 2018-02-22 22:16:54 +08:00
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 crypto: xts - remove xts_crypt() 2018-03-03 00:03:33 +08:00