linux/crypto
Ivan Pravdin b2df03ed40 crypto: algif_hash - fix double free in hash_accept
If accept(2) is called on socket type algif_hash with
MSG_MORE flag set and crypto_ahash_import fails,
sk2 is freed. However, it is also freed in af_alg_release,
leading to slab-use-after-free error.

Fixes: fe869cdb89 ("crypto: algif_hash - User-space interface for hash operations")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ivan Pravdin <ipravdin.official@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-05-19 13:44:16 +08:00
..
asymmetric_keys crypto: sig - Prepare for algorithms with variable signature size 2025-02-09 18:08:12 +08:00
async_tx async_xor: Remove unused 'async_xor_val' 2025-03-15 15:08:53 +08:00
krb5 crypto: krb5 - Use SG miter instead of doing it by hand 2025-03-21 17:33:38 +08:00
842.c crypto: 842 - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
acompress.c crypto: acomp - Fix synchronous acomp chaining fallback 2025-03-22 07:25:19 +08:00
adiantum.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
aead.c crypto: aead - use str_yes_no() helper in crypto_aead_show() 2025-02-22 15:56:03 +08:00
aegis-neon.h
aegis.h
aegis128-core.c crypto: scatterwalk - Change scatterwalk_next calling convention 2025-03-15 16:21:22 +08:00
aegis128-neon-inner.c
aegis128-neon.c
aes_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
aes_ti.c
af_alg.c
ahash.c crypto: ahash - Disable request chaining 2025-04-12 09:33:09 +08:00
akcipher.c crypto: akcipher - Drop sign/verify operations 2024-10-05 13:22:04 +08:00
algapi.c crypto: api - Call crypto_alg_put in crypto_unregister_alg 2025-03-21 17:39:06 +08:00
algboss.c
algif_aead.c
algif_hash.c crypto: algif_hash - fix double free in hash_accept 2025-05-19 13:44:16 +08:00
algif_rng.c
algif_skcipher.c
ansi_cprng.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
anubis.c crypto: anubis - stop using cra_alignmask 2024-12-14 17:21:43 +08:00
api.c crypto: remove obsolete 'comp' compression API 2025-03-21 17:39:06 +08:00
arc4.c
aria_generic.c crypto: aria - stop using cra_alignmask 2024-12-14 17:21:43 +08:00
authenc.c
authencesn.c
blake2b_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
blowfish_common.c
blowfish_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bpf_crypto_skcipher.c crypto: bpf - Add MODULE_DESCRIPTION for skcipher 2025-03-02 15:19:43 +08:00
camellia_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast5_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast6_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast_common.c
cbc.c
ccm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
chacha20poly1305.c
chacha_generic.c crypto: lib/chacha - remove unused arch-specific init support 2025-03-21 17:39:06 +08:00
cipher.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cmac.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
compress.h crypto: acomp - Move stream management into scomp layer 2025-03-15 16:21:22 +08:00
crc32_generic.c crypto: crc32 - don't unnecessarily register arch algorithms 2024-12-01 17:23:01 -08:00
crc32c_generic.c lib/crc32: remove "_le" from crc32c base and arch functions 2025-02-08 20:06:30 -08:00
cryptd.c
crypto_engine.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
crypto_null.c crypto: compress_null - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
crypto_user.c crypto: remove obsolete 'comp' compression API 2025-03-21 17:39:06 +08:00
ctr.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
cts.c
curve25519-generic.c
deflate.c crypto: deflate - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
des_generic.c
dh.c
dh_helper.c
drbg.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ecb.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ecc.c crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() 2025-02-09 18:08:12 +08:00
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
ecdsa-p1363.c crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() 2025-02-09 18:08:12 +08:00
ecdsa-x962.c crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() 2025-02-09 18:08:12 +08:00
ecdsa.c crypto: ecdsa - Support P1363 signature decoding 2024-10-05 13:22:05 +08:00
ecdsasignature.asn1
echainiv.c
ecrdsa.c crypto: ecrdsa - Fix signature size calculation 2024-10-05 13:22:05 +08:00
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
essiv.c crypto: essiv - Replace memcpy() + NUL-termination with strscpy() 2025-03-21 17:39:06 +08:00
fcrypt.c
fips.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
gcm.c
geniv.c
ghash-generic.c
hash.h
hash_info.c
hctr2.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hkdf.c crypto,fs: Separate out hkdf_extract() and hkdf_expand() 2025-03-20 16:53:53 -07:00
hmac.c
internal.h crypto: api - Add cra_type->destroy hook 2025-03-15 16:21:22 +08:00
jitterentropy-kcapi.c
jitterentropy-testing.c crypto: jitter - output full sample from test interface 2024-10-19 08:44:30 +08:00
jitterentropy.c
jitterentropy.h crypto: jitter - output full sample from test interface 2024-10-19 08:44:30 +08:00
Kconfig This update includes the following changes: 2025-03-29 10:01:55 -07:00
kdf_sp800108.c
khazad.c crypto: khazad - stop using cra_alignmask 2024-12-14 17:21:44 +08:00
kpp.c
krb5enc.c crypto: Add 'krb5enc' hash and cipher AEAD algorithm 2025-03-02 21:39:34 +00:00
lrw.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
lskcipher.c
lz4.c crypto: lz4 - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
lz4hc.c crypto: lz4hc - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
lzo-rle.c crypto: lzo-rle - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
lzo.c crypto: lzo - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00
Makefile This update includes the following changes: 2025-03-29 10:01:55 -07:00
md4.c
md5.c
michael_mic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
nhpoly1305.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
pcbc.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
pcrypt.c crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY 2024-10-28 18:32:36 +08:00
poly1305_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
polyval-generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
proc.c crypto: remove obsolete 'comp' compression API 2025-03-21 17:39:06 +08:00
ripemd.h
rmd160.c
rng.c
rsa-pkcs1pad.c crypto: rsassa-pkcs1 - Migrate to sig_alg backend 2024-10-05 13:22:04 +08:00
rsa.c crypto: rsassa-pkcs1 - Migrate to sig_alg backend 2024-10-05 13:22:04 +08:00
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
rsassa-pkcs1.c crypto: sig - Prepare for algorithms with variable signature size 2025-02-09 18:08:12 +08:00
scatterwalk.c crypto: scatterwalk - Add memcpy_sglist 2025-03-15 16:21:22 +08:00
scompress.c crypto: scompress - increment scomp_scratch_users when already allocated 2025-04-25 10:33:30 +08:00
seed.c crypto: seed - stop using cra_alignmask 2024-12-14 17:21:44 +08:00
seqiv.c
serpent_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha1_generic.c
sha3_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha256_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha512_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
shash.c
sig.c crypto: sig - Set maskset to CRYPTO_ALG_TYPE_MASK 2024-12-10 13:44:21 +08:00
simd.c
skcipher.c crypto: scatterwalk - simplify map and unmap calling convention 2025-03-21 17:33:38 +08:00
skcipher.h
sm3.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm3_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm4.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm4_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
streebog_generic.c
tcrypt.c This update includes the following changes: 2025-03-29 10:01:55 -07:00
tcrypt.h
tea.c crypto: tea - stop using cra_alignmask 2024-12-14 17:21:43 +08:00
testmgr.c Revert "crypto: testmgr - Add multibuffer acomp testing" 2025-04-19 11:07:58 +08:00
testmgr.h This update includes the following changes: 2025-03-29 10:01:55 -07:00
twofish_common.c
twofish_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
wp512.c
xcbc.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
xctr.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
xor.c
xts.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
xxhash_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
zstd.c crypto: zstd - drop obsolete 'comp' implementation 2025-03-21 17:39:06 +08:00