[SRU][R][PATCH 1/1] s390/zcrypt: Validate length for CCA ECC private key requests
Cengiz Can
cengiz.can at canonical.com
Fri Sep 11 04:38:57 UTC 2026
From: Holger Dengler <dengler at linux.ibm.com>
cca_ecc2protkey() derives the copy length for the CPRB parameter
block directly from the length field in the key token. Reject the
request early if the token length exceeds the available space in the
parameter block.
Fixes: fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")
Signed-off-by: Holger Dengler <dengler at linux.ibm.com>
Cc: stable at vger.kernel.org # 5.10+
Reviewed-by: Harald Freudenberger <freude at linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor at linux.ibm.com>
(cherry picked from commit a9ae0f6dd45c3ccc1d69363f7aea8af179122730)
CVE-2026-68451
Assisted-by: kybele:claude-opus-4.8
Signed-off-by: Cengiz Can <cengiz.can at canonical.com>
---
drivers/s390/crypto/zcrypt_ccamisc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/s390/crypto/zcrypt_ccamisc.c b/drivers/s390/crypto/zcrypt_ccamisc.c
index 37a157a1d969..4f46d0be3114 100644
--- a/drivers/s390/crypto/zcrypt_ccamisc.c
+++ b/drivers/s390/crypto/zcrypt_ccamisc.c
@@ -1425,6 +1425,9 @@ int cca_ecc2protkey(u16 cardnr, u16 domain, const u8 *key,
} __packed * prepparm;
int keylen = ((struct eccprivkeytoken *)key)->len;
+ if (keylen > PARMBSIZE - sizeof(struct aureqparm))
+ return -EINVAL;
+
/* get already prepared memory for 2 cprbs with param block each */
rc = alloc_and_prep_cprbmem(PARMBSIZE, &mem,
&preqcblk, &prepcblk, xflags);
--
2.53.0
More information about the kernel-team
mailing list