Skip to content

πŸ›‘οΈ Sentinel: [MEDIUM] Fix Slowloris (Missing WriteDeadline on 0-delay requests) - #17

Open
tejjasdev wants to merge 1 commit into
mainfrom
sentinel/fix-server-slow-read-9883747077420911889
Open

tejjasdev wants to merge 1 commit into
mainfrom
sentinel/fix-server-slow-read-9883747077420911889

Conversation

@tejjasdev

Copy link
Copy Markdown
Owner

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: The HTTP server omitted a global WriteTimeout (to support configurable dynamic delays) but only set a WriteDeadline per request if Delay > 0. This allowed malicious clients to slowly read responses with zero delay, or CORS preflights, holding connections open indefinitely (Slowloris attack).
🎯 Impact: A malicious actor could exhaust server resources and block other connections by initiating requests and reading the responses extremely slowly.
πŸ”§ Fix: Updated the server handler to unconditionally apply SetWriteDeadline using http.NewResponseController. The timeout is Delay + 30*time.Second for regular responses, and 30*time.Second for CORS preflights.
βœ… Verification: Ran make check (tests passing) and manually tested with go run dummy servers simulating the fix.

Journal entry added to .jules/sentinel.md.


PR created automatically by Jules for task 9883747077420911889 started by @tejjasdev

This adds a fallback SetWriteDeadline to the HTTP server for all paths,
including CORS preflights and zero-delay responses, preventing a
slowloris-style denial of service.

Co-authored-by: tejjasdev <213147578+tejjasdev@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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