kernel-hacking-2024-linux-s.../crypto
Herbert Xu c840ac6af3 crypto: af_alg - Disallow bind/setkey/... after accept(2)
Each af_alg parent socket obtained by socket(2) corresponds to a
tfm object once bind(2) has succeeded.  An accept(2) call on that
parent socket creates a context which then uses the tfm object.

Therefore as long as any child sockets created by accept(2) exist
the parent socket must not be modified or freed.

This patch guarantees this by using locks and a reference count
on the parent socket.  Any attempt to modify the parent socket will
fail with EBUSY.

Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-01-18 18:16:09 +08:00
..
asymmetric_keys crypto: asymmetric_keys - signature.c does not need <module.h> 2015-12-11 22:55:19 +08:00
async_tx async_tx: use GFP_NOWAIT rather than GFP_IO 2016-01-07 11:06:18 +05:30
.gitignore crypto: rsa - add .gitignore for crypto/*.-asn1.[ch] files 2015-06-25 23:29:24 +08:00
842.c
ablk_helper.c
ablkcipher.c crypto: skcipher - Copy iv from desc even for 0-len walks 2015-12-09 20:16:22 +08:00
aead.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
aes_generic.c
af_alg.c crypto: af_alg - Disallow bind/setkey/... after accept(2) 2016-01-18 18:16:09 +08:00
ahash.c crypto: ahash - ensure statesize is non-zero 2015-10-13 22:28:10 +08:00
akcipher.c crypto: akcipher - add akcipher declarations needed by templates. 2015-12-09 20:03:57 +08:00
algapi.c crypto: api - use list_first_entry_or_null and list_next_entry 2015-11-23 20:55:50 +08:00
algboss.c crypto: algboss - Remove reference to nivaead 2015-08-17 16:53:41 +08:00
algif_aead.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-12 18:51:14 -08:00
algif_hash.c crypto: algif_hash - Only export and import on sockets with data 2015-11-02 17:48:30 +08:00
algif_rng.c
algif_skcipher.c crypto: algif_skcipher - Require setkey before accept(2) 2016-01-18 18:16:07 +08:00
ansi_cprng.c
anubis.c
api.c crypto: api - Only abort operations on fatal signal 2015-10-20 21:59:25 +08:00
arc4.c
authenc.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
authencesn.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
blkcipher.c crypto: skcipher - Copy iv from desc even for 0-len walks 2015-12-09 20:16:22 +08:00
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c crypto: replace scatterwalk_sg_chain with sg_chain 2015-08-17 08:12:54 -06:00
chacha20_generic.c crypto: chacha20 - Export common ChaCha20 helpers 2015-07-17 21:20:21 +08:00
chacha20poly1305.c crypto: chacha20poly1305 - Skip encryption/decryption for 0-len 2015-12-09 20:16:04 +08:00
chainiv.c crypto: chainiv - Offer normal cipher functionality without RNG 2015-06-22 15:49:28 +08:00
cipher.c
cmac.c
compress.c
crc32.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: cryptd - Assign statesize properly 2015-12-04 22:29:53 +08:00
crypto_null.c
crypto_user.c crypto: api - Only abort operations on fatal signal 2015-10-20 21:59:25 +08:00
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
drbg.c crypto: drbg - constify drbg_state_ops structures 2015-12-10 22:39:44 +08:00
ecb.c
echainiv.c crypto: echainiv - Use generic geniv init/exit helpers 2015-08-17 16:53:46 +08:00
eseqiv.c crypto: eseqiv - Offer normal cipher functionality without RNG 2015-06-22 15:49:28 +08:00
fcrypt.c
fips.c
gcm.c Merge branch 'for-4.3/sg' of git://git.kernel.dk/linux-block 2015-09-02 13:22:38 -07:00
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h
jitterentropy-kcapi.c crypto: jitterentropy - remove unnecessary information from a comment 2015-10-14 22:23:16 +08:00
jitterentropy.c crypto: jitterentropy - Delete unnecessary checks before the function call "kzfree" 2015-06-25 23:18:33 +08:00
Kconfig crypto: keywrap - enable compilation 2015-10-15 21:05:06 +08:00
keywrap.c crypto: keywrap - add key wrapping block chaining mode 2015-10-15 21:05:04 +08:00
khazad.c
lrw.c
lz4.c
lz4hc.c
lzo.c
Makefile crypto: rsa - RSA padding algorithm 2015-12-09 20:03:57 +08:00
mcryptd.c crypto: mcryptd - use list_first_entry_or_null() 2015-11-23 20:55:51 +08:00
md4.c
md5.c crypto: hash - add zero length message hash for shax and md5 2015-12-22 20:43:35 +08:00
memneq.c
michael_mic.c
pcbc.c
pcompress.c
pcrypt.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
poly1305_generic.c crypto: poly1305 - Export common Poly1305 helpers 2015-07-17 21:20:26 +08:00
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c crypto: rng - Do not free default RNG when it becomes unused 2015-06-22 15:49:18 +08:00
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - don't allocate buffer on stack 2015-12-22 20:43:24 +08:00
rsa.c crypto: rsa - RSA padding algorithm 2015-12-09 20:03:57 +08:00
rsa_helper.c crypto: akcipher - Changes to asymmetric key API 2015-10-14 22:23:16 +08:00
rsaprivkey.asn1 crypto: akcipher - Changes to asymmetric key API 2015-10-14 22:23:16 +08:00
rsapubkey.asn1 crypto: akcipher - Changes to asymmetric key API 2015-10-14 22:23:16 +08:00
salsa20_generic.c
scatterwalk.c crypto: scatterwalk - Hide PageSlab call to optimise away flush_dcache_page 2015-06-03 10:51:25 +08:00
seed.c
seqiv.c crypto: seqiv - Use generic geniv init/exit helpers 2015-08-17 16:53:46 +08:00
serpent_generic.c
sha1_generic.c crypto: hash - add zero length message hash for shax and md5 2015-12-22 20:43:35 +08:00
sha256_generic.c crypto: hash - add zero length message hash for shax and md5 2015-12-22 20:43:35 +08:00
sha512_generic.c
shash.c
skcipher.c crypto: skcipher - blkcipher and ablkcipher should it be static 2015-10-01 21:56:57 +08:00
tcrypt.c crypto: tcrypt - fix keysize argument of test_aead_speed for gcm(aes) 2015-11-23 20:55:52 +08:00
tcrypt.h crypto: tcrypt - Add ChaCha20/Poly1305 speed tests 2015-07-17 21:20:20 +08:00
tea.c
testmgr.c crypto: keywrap - add testmgr support 2015-10-15 21:05:08 +08:00
testmgr.h crypto: keywrap - add testmgr support 2015-10-15 21:05:08 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c
zlib.c