linux/drivers/crypto/ccp
Paul Moses a7a1f3cdd6 crypto: ccp - copy IV using skcipher ivsize
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>
2026-04-16 17:37:03 +08:00
..
ccp-crypto-aes-cmac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ccp-crypto-aes-galois.c crypto: ccp - Replace snprintf("%s") with strscpy 2026-04-03 08:56:11 +08:00
ccp-crypto-aes-xts.c crypto: ccp - Replace snprintf("%s") with strscpy 2026-04-03 08:56:11 +08:00
ccp-crypto-aes.c crypto: ccp - copy IV using skcipher ivsize 2026-04-16 17:37:03 +08:00
ccp-crypto-des3.c crypto: ccp - Replace snprintf("%s") with strscpy 2026-04-03 08:56:11 +08:00
ccp-crypto-main.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ccp-crypto-rsa.c crypto: ccp - Replace snprintf("%s") with strscpy 2026-04-03 08:56:11 +08:00
ccp-crypto-sha.c crypto: ccp - Replace snprintf("%s") with strscpy 2026-04-03 08:56:11 +08:00
ccp-crypto.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
ccp-debugfs.c crypto: ccp - Fix crash when rebind ccp device for ccp.ko 2025-07-07 15:31:43 +12:00
ccp-dev-v3.c crypto: ccp - Make use of the helper macro kthread_run() 2021-10-29 21:04:04 +08:00
ccp-dev-v5.c crypto: ccp - Make use of the helper macro kthread_run() 2021-10-29 21:04:04 +08:00
ccp-dev.c crypto: ccp - use min() instead of min_t() 2025-11-24 17:44:14 +08:00
ccp-dev.h crypto: ccp - fix typo in comment 2022-06-10 16:40:18 +08:00
ccp-dmaengine.c crypto: ccp - Failure on re-initialization due to duplicate sysfs filename 2023-01-20 18:29:31 +08:00
ccp-ops.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dbc.c crypto: ccp - Use scoped guard for mutex 2024-12-14 17:21:43 +08:00
dbc.h crypto: ccp - Add support for DBC over PSP mailbox 2023-09-15 18:29:46 +08:00
hsti.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hsti.h crypto: ccp - Add support for getting security attributes on some older systems 2024-06-07 19:46:39 +08:00
Kconfig crypto/ccp: Fix CONFIG_PCI=n build 2025-12-04 18:14:08 -08:00
Makefile crypto/ccp: Implement SEV-TIO PCIe IDE (phase1) 2025-12-02 12:50:33 -08:00
platform-access.c crypto: ccp - Avoid discarding errors in psp_send_platform_access_msg() 2024-02-24 08:41:20 +08:00
platform-access.h crypto: ccp - Add support for ringing a platform doorbell 2023-03-17 11:16:43 +08:00
psp-dev.c crypto: ccp - Add an S4 restore flow 2026-01-21 10:51:59 +02:00
psp-dev.h crypto: ccp - Add sysfs attribute for boot integrity 2026-02-06 18:36:08 +08:00
sev-dev-tio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sev-dev-tio.h crypto/ccp: Implement SEV-TIO PCIe IDE (phase1) 2025-12-02 12:50:33 -08:00
sev-dev-tsm.c crypto: ccp - Fix use-after-free on error path 2026-02-28 12:51:58 +09:00
sev-dev.c crypto: ccp: Don't attempt to copy ID to userspace if PSP command failed 2026-04-16 17:33:04 +08:00
sev-dev.h crypto/ccp: Implement SEV-TIO PCIe IDE (phase1) 2025-12-02 12:50:33 -08:00
sfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sfs.h crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver 2025-09-17 12:17:05 +02:00
sp-dev.c crypto: ccp - Add an S4 restore flow 2026-01-21 10:51:59 +02:00
sp-dev.h crypto: ccp - Add an S4 restore flow 2026-01-21 10:51:59 +02:00
sp-pci.c crypto: ccp - Add an S4 restore flow 2026-01-21 10:51:59 +02:00
sp-platform.c crypto: ccp - Simplify with of_device_get_match_data() 2025-11-14 18:15:49 +08:00
tee-dev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tee-dev.h crypto: ccp - Add an S4 restore flow 2026-01-21 10:51:59 +02:00