diff options
| author | Harald Freudenberger <freude@linux.ibm.com> | 2026-07-29 16:01:34 +0200 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-07-31 13:31:20 +0200 |
| commit | 01476391aecef36a3b789ee844357b22fbc90665 (patch) | |
| tree | e852daf9c100c79af4f5a106d7b059cb59c38b78 /drivers/staging/netlogic/git@git.tavy.me:linux-stable.git | |
| parent | e935cd525af4c6ed2e2c6404aa27ca19c7f39ddb (diff) | |
s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()
The helper function _ip_cprb_helper() uses internal buffer memory for
building and processing CPRBs. After use this buffer was never
scrubbed which could lead to leaving for example clear key material in
memory which could be exposed via tricky reuse of this same memory.
Extend the _ip_cprb_helper() function with another parameter 'scrub'
used to steer scrubbing of this buffer. So now the caller has the
opportunity to decide if scrubbing is needed or not.
Extend the clear key to secure key token import process in function
cca_clr2cipherkey() to tell the helper function from above to scrub
the cprb buffer when the clear key value is part of the request data.
Add explicit scrubbing on return from function cca_clr2cipherkey() for
the random EXOR buffer and the cprb buffer.
Overall this cleans the internal used buffer in case of clear key
import to prevent sensitive data to get exposed.
Fixes: 4bc123b18ce6 ("s390/zcrypt: Add low level functions for CCA AES cipher keys")
Cc: stable@vger.kernel.org
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/staging/netlogic/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
