s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4bc123b18ce6ae6c42c69d0456b5acbd2f7bc8bd · < fbb0410986e8ad214121e51a4a28c3d0a10b7644| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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.
From the CVE record · Linux
During clear-key import, the s390/zcrypt code can leave clear-key material in internal buffers after use. That material could be exposed if the same memory is reused; the input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel with s390/zcrypt should check their deployments; affected versions are not specified.