Skip to content

RTSP: bound request bodies and preserve interleaved frame boundaries - #1164

Merged
dormancygrace merged 3 commits into
mainfrom
fix/live555-input
Dec 2, 2026
Merged

dormancygrace merged 3 commits into
mainfrom
fix/live555-input

Conversation

@dormancygrace

@dormancygrace dormancygrace commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Adapt two input-handling changes from rgaufman/live555 to NanoKVM's pinned LIVE555 2026.06.24.

  • Validate the decimal Content-Length and reject a request when its headers, body and trailing NUL cannot fit the request buffer. Close the connection after handling the invalid length.
  • Consume an unregistered interleaved channel's payload by its declared length, including across partial reads. Resume control-message parsing at the next frame boundary.

Verified all four patches against the SHA-256-pinned upstream archive with zero fuzz. Built LIVE555 on Linux with C++20 and NO_OPENSSL. A loopback client played a WAV track over interleaved TCP, sent empty and fragmented frames on an unregistered channel, and completed OPTIONS and TEARDOWN. A request whose declared body exceeded the remaining capacity received 400 immediately after the headers.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Build outputs

Compared with the build of main at c2c6517.

1 changed, 0 added, 0 removed of 722 outputs.

directory files
changed server server/NanoKVM-Server
Hashes: outputs-sha256 artifact of this run.

@dormancygrace dormancygrace changed the title RTSP: bound request bodies and preserve interleaved frame boundaries RTSP: harden input handling and trim the LIVE555 build Dec 2, 2026
@dormancygrace dormancygrace changed the title RTSP: harden input handling and trim the LIVE555 build RTSP: bound request bodies and preserve interleaved frame boundaries Dec 2, 2026

@dormancygrace dormancygrace left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed the request-buffer arithmetic, connection shutdown, and partial-read state for interleaved frames. The body bound reserves the terminating byte before pointer arithmetic, and the discard count survives short reads.

All four patches applied to the pinned LIVE555 archive with zero fuzz. A fresh Linux build completed OPTIONS, DESCRIBE, SETUP and PLAY, delivered an interleaved Opus RTP packet, and completed TEARDOWN. With #1165 and #1166 applied as well, consecutive OPTIONS with and without a body kept their sequence numbers over both TCP and certificate-verified TLS. No blocking findings.

@dormancygrace
dormancygrace merged commit a225eee into main Dec 2, 2026
13 checks passed
@dormancygrace
dormancygrace deleted the fix/live555-input branch December 2, 2026 22:24
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