Skip to content
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

Add validation for nonce size when we aren't in convergent encryption mode within transit backend #13690

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

divyapola5
Copy link
Contributor

The backend will panic when provided with a nonce value that is an invalid size when the key type is one of AES256_GCM96, AES128_GCM96, ChaCha20_Poly1305 within transit when the key does not have convergent encryption enabled.

Within sdk/helper/keysutil/policy.go func SymmetricEncryptRaw we are missing a test for the nonce size when we aren't in convergent encryption mode. We only check the nonce size is 0 to generate a value.

See VAULT-4533 for more details.

Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vercel vercel bot temporarily deployed to Preview – vault January 18, 2022 17:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 18, 2022 17:55 Inactive
@divyapola5 divyapola5 merged commit b14f1ed into main Jan 19, 2022
joatmon08 pushed a commit that referenced this pull request Jan 25, 2022
… mode within transit backend (#13690)

* Add validation for nonce size when we aren't in convergent encryption mode within transit backend

* Add changelog entry
qk4l pushed a commit to qk4l/vault that referenced this pull request Feb 4, 2022
… mode within transit backend (hashicorp#13690)

* Add validation for nonce size when we aren't in convergent encryption mode within transit backend

* Add changelog entry
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.

None yet

3 participants