Skip to content

Fix missing mem scrub at clear key import in cca_clr2cipherkey()

Harald Freudenberger linux-s390 sashiko-reviews 2 versions – Applied

Status from this message: Applied, thank you!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 4 repliesApplied
  2. v11 patch 0 repliesSuperseded

Changelog from the cover letter

v1: initial version
v2: added explicit scrubbing on return of cca_clr2cipherkey()

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/1s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()drivers/s390/crypto/zcrypt_ccamisc.c+13 -63 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchHolger Dengler
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/1] 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.

Extent 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.

Extent 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.

Changelog:
v1: initial version
v2: added explicit scrubbing on return of cca_clr2cipherkey()

Harald Freudenberger (1):
s390/zcrypt: Fix missing mem scrub at clear key import in
cca_clr2cipherkey()

 drivers/s390/crypto/zcrypt_ccamisc.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0