s390/zcrypt: Fix wrong domain value verification with EP11 CPRBs
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 23 Jul 2026 09:54:52 +0000 (11:54 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 31 Jul 2026 11:31:19 +0000 (13:31 +0200)
commit983279d7f86ade73db86f886e09172dd567031b5
tree28feb242b770e78bee9ddb4587ef671454bb7178
parent36b230835b8a008266aad22168ca52afacc8a58d
s390/zcrypt: Fix wrong domain value verification with EP11 CPRBs

There is a wrong upper limit check for the domain value when an EP11
CPRB is processed for sending to a crypto card. This check is only
active on custom device nodes but may lead to access heap memory
behind perms->adm when an administrative CPRB is sent.
Add correct limit (AP_DOMAINS = 256) checking to fix this.

Fixes: cfd68b33094e ("s390/zcrypt: Filter admin CPRBs on custom devices")
Cc: stable@vger.kernel.org
Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/zcrypt_api.c