Executive brief
A vulnerability was identified in the Linux kernel's cryptographic subsystem for s390 architectures. The component responsible for handling protected keys failed to verify if the output buffer was large enough before copying data. This could lead to memory corruption or system instability if an application provides a buffer that is too small for the generated key data.
Technical details
The vulnerability is a buffer overflow located in the `pckmo_key2protkey()` function within `drivers/s390/crypto/pkey_pckmo.c`. The root cause is a failure to validate the target buffer length (`protkeylen`) against the actual length of the generated protected key (`t->len`) before performing a `memcpy`. An attacker with local access could potentially trigger this overflow by providing a target buffer smaller than the required size for the protected key. The issue has been resolved by adding an explicit length check that returns `-EINVAL` if the output data exceeds the provided buffer size. Patches have been backported to various stable kernel branches.
Affected products
- Linux Linux Kernel 6.12, 6.18.40, 7.1.5
Timeline
- 2026-06-17: patched: Initial fix authored
- 2026-07-29: disclosed: CVE published