Skip to content

fix: bound the health/metrics HTTP server against Slowloris - #38

Merged
jimmychiuuuu merged 1 commit into
mainfrom
fix-slowloris-dos
Nov 17, 2026
Merged

jimmychiuuuu merged 1 commit into
mainfrom
fix-slowloris-dos

Conversation

@jimmychiuuuu

Copy link
Copy Markdown
Collaborator

The :8080 health/metrics server used a bare http.Serve with no timeouts or connection limit, so stalled in-cluster clients could push the plugin past its 20Mi memory limit and get it OOMKilled.

  • Serve via http.Server with ReadHeaderTimeout 2s, IdleTimeout 60s, MaxHeaderBytes 8KB, and a 64-connection cap.
  • Add a regression test.

Testing: go test ./... passes. On CGKE, a Slowloris attack OOMKills v1.1.15 but the patched plugin stays up (0 restarts); vTPM, TDX, and SNP workloads and GMP scraping still work.

Change-Id: I81939533d1fb0b80f7d732e23b4879d405d4cc10
@jimmychiuuuu
jimmychiuuuu merged commit edf7aca into main Nov 17, 2026
12 checks passed
@jimmychiuuuu
jimmychiuuuu deleted the fix-slowloris-dos branch November 17, 2026 21:26
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