Skip to content

fix: KMS client plaintext byteOffset (generate too) #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2019
Merged

fix: KMS client plaintext byteOffset (generate too) #47

merged 1 commit into from
Apr 16, 2019

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Apr 10, 2019

Issue #, if available:

Description of changes:
The KMS Client may return a Buffer that is not isolated.
i.e. the byteOffset !== 0.
This means that the unencrypted data key is possibly accessible to someone else.
If this is the node shared Buffer, then other code within this process could find this secret.
Copy Plaintext to an isolated ArrayBuffer and zero the Plaintext.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The KMS Client *may* return a Buffer that is not isolated.
i.e. the byteOffset !== 0.
This means that the unencrypted data key is possibly accessible to someone else.
If this is the node shared Buffer, then other code within this process _could_ find this secret.
Copy Plaintext to an isolated ArrayBuffer and zero the Plaintext.
@seebees seebees requested a review from a team April 10, 2019 20:29
@seebees seebees merged commit 1532b9e into aws:master Apr 16, 2019
@seebees seebees deleted the kms-plaintext-not-isolated2 branch April 16, 2019 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants