Skip to content

rustls: break recv loop on empty plain text - #23092

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:rustls-recv-look-break
Closed

icing wants to merge 1 commit into
curl:masterfrom
icing:rustls-recv-look-break

Conversation

@icing

@icing icing commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Break out of rustls' receive loop on empty plaintext results (due to a TLS message not having any) to prevent the famous "malicious" server from keeping curl in that loop forever.

reported-by: Joshua Rogers

Break out of rustls' receive loop on empty plaintext results
(due to a TLS message not having any) to prevent the famous
"malicious" server from keeping curl in that loop forever.

reported-by: Joshua Rogers

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates rustls receive-loop handling to prevent indefinite spinning on empty plaintext results.

Changes:

  • Clears pending-input state.
  • Exits the receive loop on empty plaintext.
File Description
lib/​vtls/​rustls.c Prevents infinite receive-loop iteration on empty TLS plaintext.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the TLS label Sep 25, 2026
@bagder bagder closed this in 44835a3 Sep 25, 2026

@cpu cpu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch folks. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants