Skip to content

Fill correct view region in crypto.getRandomValues #1659

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
Feb 3, 2021

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Feb 3, 2021

This one is security relevant in that the initial implementation of crypto.getRandomValues shipped in 0.18.0 does not fill the correct region of the typed array view if byteOffset>0. Luckily the API exists for only 6 days so far and byteOffset>0 is rare.

Postmortem is that I initially designed the API for an ArrayBuffer argument, not Uint8Array, and when I decided to switch to Uint8Array for more convenient usage of the API I apparently had an acute attack of stupidity. Reporting this myself after another acute attack of waaaiiit a minute...

  • I've read the contributing guidelines

@dcodeIO dcodeIO merged commit cc37cc4 into master Feb 3, 2021
@dcodeIO dcodeIO deleted the fix-getRandomValues branch June 1, 2021 15:20
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.

1 participant