linux/drivers/crypto
Paul Moses 798d409a89 crypto: ccp - copy IV using skcipher ivsize
[ Upstream commit a7a1f3cdd6 ]

AF_ALG rfc3686-ctr-aes-ccp requests pass an 8-byte IV to the driver.

ccp_aes_complete() restores AES_BLOCK_SIZE bytes into the caller's IV
buffer while RFC3686 skciphers expose an 8-byte IV, so the restore
overruns the provided buffer.

Use crypto_skcipher_ivsize() to copy only the algorithm's IV length.

Fixes: 2b789435d7 ("crypto: ccp - CCP AES crypto API support")
Signed-off-by: Paul Moses <p@1g4.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-06-01 17:35:37 +02:00
..
allwinner crypto: sun8i-ce - move fallback ahash_request to the end of the struct 2025-06-27 11:05:10 +01:00
amcc crypto: crypto4xx - Call dma_unmap_page when done 2023-03-10 09:39:17 +01:00
amlogic crypto: amlogic - Remove kcalloc without check 2022-12-31 13:14:25 +01:00
axis crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
bcm crypto: bcm - add error check in the ahash_hmac_init function 2024-12-14 19:50:45 +01:00
caam crypto: caam/qi - Fix drv_ctx refcount bug 2025-05-02 07:44:12 +02:00
cavium crypto: cavium - fix dma_free_coherent() size 2026-03-04 07:19:24 -05:00
ccp crypto: ccp - copy IV using skcipher ivsize 2026-06-01 17:35:37 +02:00
ccree crypto: ccree - fix a memory leak in cc_mac_digest() 2026-06-01 17:35:17 +02:00
chelsio crypto: chelsio/chcr - Remove useless MODULE_VERSION 2021-04-22 17:31:31 +10:00
gemini crypto: gemini - call finalize with bh disabled 2022-04-08 14:23:08 +02:00
hisilicon crypto: hisilicon - Fix dma_unmap_single() direction 2026-06-01 17:35:17 +02:00
inside-secure crypto: inside-secure - Fix dma_unmap_sg() nents value 2025-08-28 16:24:09 +02:00
keembay crypto: keembay - Fix dma_unmap_sg() nents value 2025-08-28 16:24:10 +02:00
marvell crypto: octeontx - fix dma_free_coherent() size 2026-03-04 07:19:24 -05:00
nx crypto: nx - Fix uninitialised hv_nxc on error 2025-04-10 14:32:01 +02:00
qat crypto: qat - fix seq_file position update in adf_ring_next() 2025-08-28 16:24:11 +02:00
qce crypto: qce - unregister previously registered algos in error path 2025-03-13 12:50:31 +01:00
rockchip crypto: rockchip - Fix dma_unmap_sg() nents value 2025-10-29 14:03:07 +01:00
stm32 crypto: stm32/crc32 - fix parsing list of devices 2024-02-23 08:54:39 +01:00
ux500 crypto: ux500 - Fix error return code in hash_hw_final() 2021-05-14 19:07:58 +08:00
virtio crypto: virtio - Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req 2026-02-19 16:21:45 +01:00
vmx crypto: vmx - add missing dependencies 2022-04-08 14:23:08 +02:00
xilinx crypto: xilinx - call finalize with bh disabled 2024-03-26 18:21:27 -04:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel-aes - Fix 3-page memory leak in atmel_aes_buff_cleanup 2026-06-01 17:35:17 +02:00
atmel-authenc.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
atmel-ecc.c crypto: atmel-ecc - Release client on allocation failure 2026-06-01 17:35:17 +02:00
atmel-i2c.c crypto: atmel - use the correct print format 2021-04-16 21:16:33 +10:00
atmel-i2c.h crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: atmel - use the correct print format 2021-04-16 21:16:33 +10:00
atmel-sha204a.c crypto: atmel-sha204a - Set hwrng quality to lowest possible 2025-05-02 07:44:39 +02:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c crypto: atmel-tdes - fix DMA sync direction 2026-06-01 17:35:18 +02:00
exynos-rng.c crypto: exynos - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:59 +10:00
geode-aes.c crypto: geode - use DEFINE_SPINLOCK() for spinlock 2021-04-16 21:16:31 +10:00
geode-aes.h crypto: geode-aes - convert to skcipher API and make thread-safe 2019-10-23 19:46:56 +11:00
hifn_795x.c crypto: drivers - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
img-hash.c crypto: img-hash - Fix dma_unmap_sg() nents value 2025-08-28 16:24:10 +02:00
ixp4xx_crypto.c crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto() 2025-03-13 12:50:01 +01:00
Kconfig crypto: sa2ul - Select CRYPTO_DES 2023-05-11 23:00:27 +09:00
Makefile crypto: sl3516 - Add sl3516 crypto engine 2021-06-11 15:03:29 +08:00
mxs-dcp.c crypto: mxs-dcp - Fix scatterlist processing 2022-04-08 14:23:05 +02:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c crypto: n2 - add missing hash statesize 2023-01-12 11:58:58 +01:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c crypto: omap-aes - avoid spamming console with self tests 2020-06-04 22:03:39 +10:00
omap-aes.c crypto: omap-aes - Fix broken pm_runtime_and_get() usage 2022-01-27 11:05:06 +01:00
omap-aes.h crypto: omap-aes - permit asynchronous skcipher as fallback 2020-07-16 21:49:02 +10:00
omap-crypto.c crypto: omap - Allocate OMAP_CRYPTO_FORCE_COPY scatterlists correctly 2026-02-19 16:21:43 +01:00
omap-crypto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-des.c crypto: omap - Fix inconsistent locking of device lists 2021-08-21 15:44:53 +08:00
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2022-12-31 13:14:26 +01:00
padlock-aes.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
padlock-sha.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
qcom-rng.c crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ 2022-05-25 09:57:28 +02:00
s5p-sss.c crypto: s5p-sss - Add error handling in s5p_aes_probe() 2021-11-18 19:15:53 +01:00
sa2ul.c crypto: sa2ul - Fix AEAD fallback algorithm names 2026-06-01 17:35:37 +02:00
sa2ul.h crypto: sa2ul - Add support for AM64 2021-04-22 17:31:30 +10:00
sahara.c crypto: sahara - do not resize req->src when doing hash operations 2024-01-25 14:52:35 -08:00
talitos.c crypto: talitos - Fix ctr(aes) on SEC1 2021-01-29 15:57:59 +11:00
talitos.h crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-01-29 15:57:58 +11:00