postgres-protocol: update to 0.6.12 to bound SCRAM work - #34
Merged
bosconi merged 1 commit intoSep 23, 2026
Merged
Conversation
jasonhernandez
requested changes
Sep 23, 2026
jasonhernandez
left a comment
There was a problem hiding this comment.
that max iteration count is too low. I think we default to a higher number (600k iirc)
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.
Motivation
Fix GHSA-5x78-73v4-xg6w: a malicious PostgreSQL server can supply an unbounded SCRAM iteration count and exhaust client CPU during authentication.
Description
Update only the
postgres-protocolsubtree to upstreampostgres-protocol-v0.6.12. Retain the fork'sCopyBothResponsesupport, which the replication client requires. The protocol subtree differs from the upstream release only by that existing replication extension. Other fork crates retain their current versions and changes.This imports the upstream 100,000-iteration cap and regression test, along with the intervening protocol releases and their dependency updates. It is a prerequisite for Materialize #39076 and Cloud #13465. Those PRs currently pin this branch commit. If this PR is squash-merged or rebased, update their lockfiles to the resulting accepted commit before merging them.
Verification
The 29 protocol unit tests pass, including rejection of excessive SCRAM iterations and the normal SCRAM exchange. The fork's tokio-postgres, postgres-types, and postgres-replication crates compile against the updated protocol. Protocol formatting and Clippy checks pass.