Commit 69f0e0c
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
- trunk
- 3rdparty
- patches/srt
- srt-1-fit
- common/win
- haicrypt
- scripts
- build-android
- build-ios
- codespell
- release-notes
- win-installer
- srtcore
- src
- app
- protocol
- utest
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
0 commit comments