Skip to content

Backport #4729: Upgrade libsrt to 1.5.6 for security enhancement. v6.0.192 - #4732

Merged
winlinvip merged 1 commit into
ossrs:6.0releasefrom
winlinvip:fix/srt-1.5.6-v6
Aug 20, 2026
Merged

Backport #4729: Upgrade libsrt to 1.5.6 for security enhancement. v6.0.192#4732
winlinvip merged 1 commit into
ossrs:6.0releasefrom
winlinvip:fix/srt-1.5.6-v6

Conversation

@winlinvip

@winlinvip winlinvip commented Aug 20, 2026

Copy link
Copy Markdown
Member

Backport of #4729 to SRS 6.0, upgrading the vendored SRT library from 1.5.3 to 1.5.6.

Fixes #4727 for the 6.0 branch, which is the release the issue originally asked about.

Both CVEs fixed in upstream 1.5.6 were confirmed reachable in SRS, not merely present by version number:

  • CVE-2026-55869 (upstream PR WebRTC: Reqeust PLI invalid play cid. #3317) — processSrtMsg_KMREQ copied bytelen/4 words into a 104-byte stack buffer with no capacity check. The existing bytelen <= HCRYPT_MSG_KM_OFS_SALT test is a lower bound and runs after the copy.
  • CVE-2026-55868 (upstream PR #3319) — processSrtMsg_KMRSP did the same with no validation of len at all.

The enforced-encryption gate in interpretSrtHandshake covers the handshake path, but not the post-connect UMSG_EXT control packet path, which has no passphrase gate and reaches both handlers on any established connection. At the default MSS of 1500 that is roughly 1352 bytes of stack overflow from any peer that completes a handshake.

SRT is off by default at runtime (get_srt_enabled() returns false and stock conf/srs.conf has no srt_server block), so only deployments that explicitly enable srt_server were exposed.

1.5.6 also carries three hardening changes (upstream PRs #3324, #3320, #3322), which matter less in SRS — full reachability analysis in #4727 (comment)

Backport of ossrs#4729 to SRS 6.0. Replace the vendored srt-1-fit tree with
upstream SRT v1.5.6 to pick up two remotely reachable security fixes:

- CVE-2026-55869 (upstream PR ossrs#3317): processSrtMsg_KMREQ copied bytelen/4
  words into a 104-byte stack buffer with no capacity check.
- CVE-2026-55868 (upstream PR #3319): processSrtMsg_KMRSP did the same with
  no validation of len at all.

Both were reachable through the post-connect UMSG_EXT control packet path,
which has no passphrase gate, so a peer that completes a handshake could
overflow the stack buffer by about 1352 bytes. SRT is off by default at
runtime, so only deployments that explicitly enable srt_server were exposed.
1.5.6 also carries three hardening fixes (upstream PR ossrs#3324, #3320, ossrs#3322).

The 6.0 fit tree was byte-identical to the one on develop, a pure subset of
upstream 1.5.3 with no local edits, so 1.5.6 is vendored the same way: apps,
tests, docs, examples, CI files, and the new submodules directory are pruned,
everything else is pristine upstream.

Retarget patches/srt/api.cpp-01.patch from line 1116 to 1312. The old number
was already stale for 1.5.3, where the line sat at 1133 and patch located it
by content.

Add srs_srt_cleanup() and call it from SrsServer::stop() and from the utest
main. SRS starts libsrt lazily and never stopped it, so its worker threads
outlived the libsrt global objects destroyed at exit. Since 1.5.6,
~LogDispatcher resets its config pointer to NULL while Proxy::Proxy still
dereferences it after a non-atomic CheckEnabled(), so a worker thread logging
during teardown can crash. On develop this reproduced as a deterministic SEGV
in the utest. It does not reproduce in 6.0, whose utest leaves no worker
logging at exit, but the same race is present: before this change an SRT
worker still logged after the final "srs terminated" line on graceful
shutdown, and now it does not. Both call sites are guarded by SRS_SRT.

Verified: libsrt builds reporting SRT_VERSION_STRING "1.5.6", the api.cpp
patch applies with no offset, make completes for both --srt=on and --srt=off,
utest passes 588/588 across three runs, srs reports 6.0.192, and srt_server
binds UDP 10080 and shuts down gracefully with no worker log after teardown.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@winlinvip winlinvip changed the title Claude: Backport libsrt 1.5.6 upgrade for CVE-2026-55868/55869. v6.0.192 Backport #4729: Upgrade libsrt from 1.5.3 to 1.5.6 for CVE-2026-55868/55869. v6.0.192 Aug 20, 2026
@winlinvip winlinvip changed the title Backport #4729: Upgrade libsrt from 1.5.3 to 1.5.6 for CVE-2026-55868/55869. v6.0.192 Backport #4729: Upgrade libsrt to 1.5.6 for security enhancement. v6.0.192 Aug 20, 2026
@winlinvip
winlinvip merged commit cdaf676 into ossrs:6.0release Aug 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant