Skip to content

rtsp: refuse doing uploads with CRLF conversions - #23425

Closed
bagder wants to merge 4 commits into
masterfrom
bagder/rtsp-crlf-upload
Closed

bagder wants to merge 4 commits into
masterfrom
bagder/rtsp-crlf-upload

Conversation

@bagder

@bagder bagder commented Oct 15, 2026

Copy link
Copy Markdown
Member

Since then it doesn't know how big it is.

Verified by test 2622

Reported-by: revolik on hackerone

Since then it doesn't know how big it is.

Verified by test 2622

Reported-by: revolik on hackerone
@bagder bagder added the RTSP label Oct 15, 2026
@github-actions github-actions Bot added the tests label Oct 15, 2026
@bagder
bagder marked this pull request as ready for review October 15, 2026 22:01
@bagder
bagder requested a balanced review from Copilot October 15, 2026 22:01

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.

🟡 Changes recommended

POST-style bodies and ASCII-mode uploads still bypass the guard and can produce incorrect Content-Length values.

1 open finding
What changed in this PR

This PR rejects RTSP uploads requesting CRLF conversion because conversion makes the body length unknown.

Changes:

  • Return CURLE_UPLOAD_FAILED for CRLF-enabled uploads.
  • Extend the test helper and register regression test 2622.
File Description
tests/​libtest/​lib568.c Accepts an argument enabling CRLF conversion.
tests/​data/​test2622 Verifies rejection of a CRLF-enabled RTSP upload.
tests/​data/​Makefile.am Registers test 2622.
lib/​rtsp.c Adds the upload conversion guard.

🧠 Review effort: Balanced


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

Comment thread lib/rtsp.c Resolved

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.

🟡 Changes recommended

The new check also rejects empty GET_PARAMETER heartbeats that require no conversion.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread lib/rtsp.c Resolved
@bagder bagder closed this in e84f95a Oct 16, 2026
@bagder
bagder deleted the bagder/rtsp-crlf-upload branch October 16, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants