Skip to content

postgres-protocol: update to 0.6.12 to bound SCRAM work - #34

Merged
bosconi merged 1 commit into
MaterializeInc:masterfrom
bosconi:jc/postgres-protocol-security
Sep 23, 2026
Merged

bosconi merged 1 commit into
MaterializeInc:masterfrom
bosconi:jc/postgres-protocol-security

Conversation

@bosconi

@bosconi bosconi commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

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-protocol subtree to upstream postgres-protocol-v0.6.12. Retain the fork's CopyBothResponse support, 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.

@bosconi
bosconi marked this pull request as ready for review September 23, 2026 20:36
@bosconi
bosconi merged commit cf5410c into MaterializeInc:master Sep 23, 2026
1 of 4 checks passed

@jasonhernandez jasonhernandez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

that max iteration count is too low. I think we default to a higher number (600k iirc)

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