Skip to content

Commit 69f0e0c

Browse files
winlinvipclaude
andcommitted
Claude: Backport #4729: Upgrade libsrt to 1.5.6 for security enhancement.
Backport the SRT 1.5.6 upgrade from develop (9ff7e24) to SRS 7.0, which fixes two remotely reachable stack overflows: - CVE-2026-55869 (upstream PR #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. The enforced-encryption gate in interpretSrtHandshake blocks the handshake path when no passphrase is configured, but the post-connect UMSG_EXT control packet path (CUDT::processSrtMsg) has no such gate and needs no passphrase, 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 #3324, #3320, #3322) for out-of-bounds reads in LOSSREPORT and DROPREQ parsing and a drop-range guard in CRcvBuffer::dropMessage. Also backport srs_srt_cleanup(). SRS started 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, so a worker thread logging during teardown dereferences it and crashes. Calling srt_cleanup() from SrsServer::stop() and from the utest main stops libsrt and joins those threads first. The utest needs its own call because it has a separate main that never goes through SrsServer::stop(). This commit carries the code change only. The version bump and the changelog entry are not included. Verified on this branch: libsrt builds reporting SRT_VERSION_STRING "1.5.6", the api.cpp patch applies with no offset, the srs binary links against 1.5.6, utest passes 2195/2195 over three runs with no SEGV or AddressSanitizer error under ASAN, and all eight bundled integration scripts pass, including the SRT publish test verifying RTMP, HTTP-FLV, and HLS playback. The vendored tree is byte-identical to develop after 9ff7e24. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 7282464 commit 69f0e0c

122 files changed

Lines changed: 7352 additions & 2921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

trunk/3rdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ nginx-1.5.7.zip
99
* for srs to support hls streaming.
1010

1111
srt-1-fit
12-
srt-1.5.3.tar.gz
13-
* https://github.com/Haivision/srt/releases/tag/v1.5.3
12+
srt-1.5.6.tar.gz
13+
* https://github.com/Haivision/srt/releases/tag/v1.5.6
1414
* https://ossrs.net/lts/zh-cn/license#srt
1515

1616
openssl-1.1-fit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1116c1116
1+
1312c1312
22
< LOGC(cnlog.Debug, log << "srt_accept: no pending connection available at the moment");
33
---
44
> LOGC(cnlog.Error, log << "srt_accept: no pending connection available at the moment");

0 commit comments

Comments
 (0)