Skip to content

Limit proxy protocol header to 256 bytes - #3199

Open
gbrodman wants to merge 1 commit into
google:masterfrom
gbrodman:maxHeaderBytes
Open

Limit proxy protocol header to 256 bytes#3199
gbrodman wants to merge 1 commit into
google:masterfrom
gbrodman:maxHeaderBytes

Conversation

@gbrodman

@gbrodman gbrodman commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The maximum length for the proxy header according to https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt is actually 108 bytes but we use 256 just to be safe.

We don't want to allow a potential attacker to send a continuous slow stream of characters, possibly causing an OOM.

All of our traffic should come through the load balancer so this shouldn't be an issue; this is just defense-in-depth

D.4 12

b/535251420


This change is Reviewable

The maximum length for the proxy header according to
https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt is actually
108 bytes but we use 256 just to be safe.

We don't want to allow a potential attacker to send a continuous slow
stream of characters, possibly causing an OOM.

All of our traffic should come through the load balancer so this
shouldn't be an issue; this is just defense-in-depth

D.4 12

b/535251420
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