linux-kernelorg-stable/crypto
Herbert Xu 50fdb78b7c crypto: seqiv - Do not use req->iv after crypto_aead_encrypt
As soon as crypto_aead_encrypt is called, the underlying request
may be freed by an asynchronous completion.  Thus dereferencing
req->iv after it returns is invalid.

Instead of checking req->iv against info, create a new variable
unaligned_info and use it for that purpose instead.

Fixes: 0a270321db ("[CRYPTO] seqiv: Add Sequence Number IV Generator")
Reported-by: Xiumei Mu <xmu@redhat.com>
Reported-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-12-19 14:47:06 +08:00
..
asymmetric_keys crypto: asymmetric_keys - fix uninitialized pointers with free attribute 2025-11-22 10:04:50 +08:00
async_tx lib/raid6: replace custom zero page with ZERO_PAGE 2025-07-09 22:57:54 -07:00
krb5 crypto: krb5 - Fix memory leak in krb5_test_one_prf() 2025-07-18 20:52:00 +10:00
842.c crypto: comp - Use same definition of context alloc and free ops 2025-09-20 20:21:03 +08:00
Kconfig This update includes the following changes: 2025-12-03 11:28:38 -08:00
Makefile This update includes the following changes: 2025-12-03 11:28:38 -08:00
acompress.c
adiantum.c
aead.c crypto: aead - Add support for on-stack AEAD req allocation 2025-10-31 17:43:56 +08:00
aegis-neon.h
aegis.h
aegis128-core.c
aegis128-neon-inner.c
aegis128-neon.c crypto: aegis128-neon - Move to more abstract 'ksimd' guard API 2025-11-12 09:52:01 +01:00
aes_generic.c
aes_ti.c
af_alg.c Networking changes for 6.19. 2025-12-03 17:24:33 -08:00
ahash.c crypto: ahash - Zero positive err value in ahash_update_finish 2025-11-24 17:53:02 +08:00
akcipher.c
algapi.c
algboss.c
algif_aead.c
algif_hash.c crypto: af_alg - zero initialize memory allocated via sock_kmalloc 2025-10-17 16:03:57 +08:00
algif_rng.c crypto: af_alg - zero initialize memory allocated via sock_kmalloc 2025-10-17 16:03:57 +08:00
algif_skcipher.c
anubis.c crypto: anubis - simplify return statement in anubis_mod_init 2025-09-20 20:21:04 +08:00
api.c
arc4.c
aria_generic.c
authenc.c crypto: authenc - Correctly pass EINPROGRESS back up to the caller 2025-10-17 16:03:58 +08:00
authencesn.c
blake2b.c crypto: blake2b - Reimplement using library API 2025-10-29 22:04:24 -07:00
blowfish_common.c
blowfish_generic.c
bpf_crypto_skcipher.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
chacha.c crypto: chacha - register only "-lib" drivers 2025-08-29 09:50:19 -07:00
chacha20poly1305.c
cipher.c
cmac.c
compress.h
crc32.c crypto/crc32[c]: register only "-lib" drivers 2025-06-30 09:31:56 -07:00
crc32c.c crypto/crc32[c]: register only "-lib" drivers 2025-06-30 09:31:56 -07:00
cryptd.c crypto: cryptd - WQ_PERCPU added to alloc_workqueue users 2025-09-13 12:11:06 +08:00
crypto_engine.c crypto: engine - remove {prepare,unprepare}_crypt_hardware callbacks 2025-07-18 20:52:00 +10:00
crypto_null.c
crypto_user.c
ctr.c
cts.c
deflate.c crypto: deflate - Use struct_size to improve deflate_alloc_stream 2025-11-06 14:31:08 +08:00
des_generic.c
df_sp80090a.c crypto: drbg - make drbg_{ctr_bcc,kcapi_sym}() return *void* 2025-10-17 16:10:27 +08:00
dh.c
dh_helper.c
drbg.c crypto: drbg - Delete unused ctx from struct sdesc 2025-11-24 17:43:40 +08:00
ecb.c
ecc.c
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
ecdsa-p1363.c
ecdsa-x962.c
ecdsa.c
ecdsasignature.asn1
echainiv.c
ecrdsa.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
essiv.c crypto: essiv - Check ssize for decryption and in-place encryption 2025-10-09 15:02:35 +08:00
fcrypt.c
fips.c crypto: fips - replace simple_strtol with kstrtoint to improve fips_enable 2025-10-17 16:03:57 +08:00
gcm.c
geniv.c
ghash-generic.c
hash.h
hctr2.c crypto: hctr2 - Convert to use POLYVAL library 2025-11-11 11:03:38 -08:00
hkdf.c crypto: hkdf - move to late_initcall 2025-06-11 10:59:45 +08:00
hmac.c
internal.h
jitterentropy-kcapi.c crypto: jitterentropy - Use default sha3 implementation 2025-11-05 20:30:51 -08:00
jitterentropy-testing.c
jitterentropy.c crypto: jitter - replace ARRAY_SIZE definition with header include 2025-07-18 20:52:01 +10:00
jitterentropy.h
kdf_sp800108.c
khazad.c
kpp.c
krb5enc.c
lrw.c
lskcipher.c
lz4.c crypto: comp - Use same definition of context alloc and free ops 2025-09-20 20:21:03 +08:00
lz4hc.c crypto: comp - Use same definition of context alloc and free ops 2025-09-20 20:21:03 +08:00
lzo-rle.c crypto: comp - Use same definition of context alloc and free ops 2025-09-20 20:21:03 +08:00
lzo.c crypto: comp - Use same definition of context alloc and free ops 2025-09-20 20:21:03 +08:00
md4.c
md5.c crypto: md5 - Implement export_core() and import_core() 2025-09-08 09:47:38 -07:00
michael_mic.c
nhpoly1305.c
pcbc.c
pcrypt.c crypto: pcrypt - Optimize pcrypt_aead_init_tfm() 2025-06-13 17:26:17 +08:00
proc.c
ripemd.h
rmd160.c
rng.c crypto: rng - Ensure set_ent is always present 2025-10-06 10:17:07 +08:00
rsa-pkcs1pad.c
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
rsassa-pkcs1.c
scatterwalk.c Revert "crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist" 2025-11-22 10:04:50 +08:00
scompress.c crypto: remove nth_page() usage within SG entry 2025-09-21 14:22:09 -07:00
seed.c
seqiv.c crypto: seqiv - Do not use req->iv after crypto_aead_encrypt 2025-12-19 14:47:06 +08:00
serpent_generic.c
sha1.c crypto: sha1 - Implement export_core() and import_core() 2025-09-02 19:02:35 -07:00
sha3.c crypto: sha3 - Reimplement using library API 2025-11-05 20:30:51 -08:00
sha256.c crypto: sha256 - Implement export_core() and import_core() 2025-09-02 19:02:37 -07:00
sha512.c crypto: sha512 - Implement export_core() and import_core() 2025-09-02 19:02:39 -07:00
shash.c crypto: shash - Fix buffer overrun in import function 2025-05-27 13:43:32 +08:00
sig.c
simd.c
skcipher.c Revert "crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist" 2025-11-22 10:04:50 +08:00
skcipher.h
sm3_generic.c
sm4.c
sm4_generic.c
streebog_generic.c
tcrypt.c This update includes the following changes: 2025-12-03 11:28:38 -08:00
tcrypt.h crypto: tcrypt - Remove unused poly1305 support 2025-11-22 10:04:50 +08:00
tea.c
testmgr.c This update includes the following changes: 2025-12-03 11:28:38 -08:00
testmgr.h This update includes the following changes: 2025-12-03 11:28:38 -08:00
twofish_common.c
twofish_generic.c
wp512.c crypto: wp512 - Use API partial block handling 2025-06-23 16:56:56 +08:00
xcbc.c
xctr.c
xor.c
xts.c
xxhash_generic.c
zstd.c crypto: zstd - fix double-free in per-CPU stream cleanup 2025-12-01 18:05:07 +08:00