Skip to content

fix data race in getEd25519Sk #220

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
Aug 21, 2024
Merged

Conversation

DmitriyMV
Copy link
Contributor

Private key generation functions make no promises about capacity of the private key byte slice. So in the rare cases Sign method called concurrently will result in corrupted byte slice.

Ensure that this doesnt happen by always creating a new slice.

Copy link
Member

@twiss twiss left a comment

Choose a reason for hiding this comment

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

👍 Thanks!

Private key generation functions make no promises about capacity of the
private key byte slice. So in the rare cases `Sign` method called concurrently
will result in corrupted byte slice.

Ensure that this doesnt happen by always creating a new slice.

Signed-off-by: Dmitriy Matrenichev <[email protected]>
@DmitriyMV
Copy link
Contributor Author

DmitriyMV commented Jul 24, 2024

@twiss can we merge this?

@DmitriyMV
Copy link
Contributor Author

@twiss kindly pinging

Copy link
Member

@twiss twiss left a comment

Choose a reason for hiding this comment

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

Yeah, apologies for the long delay!

@twiss twiss merged commit 09dfd62 into ProtonMail:main Aug 21, 2024
8 checks passed
@DmitriyMV DmitriyMV deleted the fix-data-race branch August 21, 2024 18:41
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.

2 participants