Don't allow update_into to mutate immutable objects#8230
Merged
reaperhulk merged 1 commit intopyca:mainfrom Feb 7, 2023
Merged
Don't allow update_into to mutate immutable objects#8230reaperhulk merged 1 commit intopyca:mainfrom
reaperhulk merged 1 commit intopyca:mainfrom
Conversation
reaperhulk
approved these changes
Feb 7, 2023
reaperhulk
pushed a commit
to reaperhulk/cryptography
that referenced
this pull request
Feb 7, 2023
alex
added a commit
that referenced
this pull request
Feb 7, 2023
* Don't allow update_into to mutate immutable objects (#8230) * add changelog for 39.0.1 * oops * bump versions * remove circle --------- Co-authored-by: Alex Gaynor <[email protected]>
|
Does this involve interface changes? |
Member
|
It behaves exactly the same unless you were passing an immutable type (e.g. a byte string). So the interface has technically changed but in practice it has only changed for the vulnerable path. |
|
In this case, change the buf class type from it can't use the def update_into(self, data: bytes, buf: bytes) -> int: |
|
I'm not sure what the effect of this vulnerability is. |
Member
|
Unfortunately the Python type hint system doesn’t have a way to represent “all objects that implement the buffer protocol but only the mutable types”, so |
|
What is the impact of this cve? I don't seem to feel the threat of this vulnerability. |
icanhasmath
added a commit
to ActiveState/cryptography
that referenced
this pull request
Jan 18, 2024
icanhasmath
added a commit
to ActiveState/cryptography
that referenced
this pull request
Jan 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.