]> exis.tech > repos - linux.git/commit
s390/pkey: Check length in pkey_pckmo handler implementation
authorHolger Dengler <dengler@linux.ibm.com>
Wed, 17 Jun 2026 17:06:39 +0000 (19:06 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 19 Jun 2026 12:51:08 +0000 (14:51 +0200)
commit1ac287e2af9a9112fe271427ef45eceb26bce8b4
treed31454f1dd9efbf041f4bfdd0c01f7a327f23e2a
parentb3d4ab2d7df9426f7f1d3671d7e2108f2ca6e970
s390/pkey: Check length in pkey_pckmo handler implementation

Explicitly check the length of the target buffer in the pkey_pckmo
implementation of the key_to_protkey() handler function. The handler
function fails, if the generated output data exceeds the length of the
provided target buffer.

Cc: stable@vger.kernel.org
Fixes: 8fcc231ce3be ("s390/pkey: Introduce pkey base with handler registry and handler modules")
Reported-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/crypto/pkey_pckmo.c