Repository navigation
deps.ffmpeg: Update Mbed TLS to 3.6.7 - #3
Conversation
|
The failing "Build FFmpeg for Windows (x64)" job stopped inside libvpx 1.14.1, which this PR doesn't change. The linker reported |
|
The Windows x64 blocker (libvpx with NASM 3.02) is fixed on master by #5 (6d86aef). This branch predates it, so its Windows FFmpeg jobs still build the old libvpx. A rebase onto master, or a re-run after merging master, should clear them. This is the Mbed TLS 3.6.7 update for the public advisories in obs-rust/obs-studio#1121 (RTMPS certificate checks), so it's the one to take first; #1 and #2 have the same stale base. |
Update Mbed TLS from 3.6.4 to 3.6.7 (commit 068ff080b369, tag mbedtls-3.6.7) to fix public advisories that affect the RTMPS client (certificate and handshake checks), among them: * CVE-2026-49300: malformed basicConstraints could make a certificate parse as a CA certificate https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2026-07-x509-ca-bit-forgery-invalid-basicconstraints * CVE-2026-25832: TLS 1.3 client accepted a HelloRetryRequest for a group it never offered https://nvd.nist.gov/vuln/detail/CVE-2026-25832 * CVE-2026-50581: TLS 1.2 extended master secret errors could be ignored https://nvd.nist.gov/vuln/detail/CVE-2026-50581 * CVE-2026-50583: 1-byte overread parsing a malformed ECC public key https://nvd.nist.gov/vuln/detail/CVE-2026-50583 * CVE-2026-25834: TLS 1.2 client accepted a ServerKeyExchange signed with a disallowed signature algorithm https://nvd.nist.gov/vuln/detail/CVE-2026-25834 * CVE-2026-25833: buffer underflow in x509_inet_pton_ipv6() (IPv6 server addresses) https://nvd.nist.gov/vuln/detail/CVE-2026-25833 Patch changes: * 0001-enable-posix-threading-support: Rebase onto 3.6.7. The change is the same (MBEDTLS_THREADING_PTHREAD and MBEDTLS_THREADING_C). The old second hunk only applied with fuzz 2, on 3.6.4 as well, because a context line now says "Mbed TLS" instead of "mbed TLS". * 0002-enable-dtls-srtp-support and 0001-enable-dtls-srtp-support-windows: Unchanged. They apply with no fuzz, only an offset. Both are still needed: 3.6.7 still ships with MBEDTLS_SSL_DTLS_SRTP off, and libdatachannel needs it for WebRTC. librist on Windows was built with -Dbuiltin_mbedtls=true, which compiles the copy of Mbed TLS bundled with librist 0.2.7. That copy is Mbed TLS 2.26.0. Build librist against the Mbed TLS from 60-mbedtls.ps1 instead, as macOS already does. Pass the include and library paths and bcrypt (for the static mbedcrypto entropy source) through a second meson cross file, and set -Dfallback_builtin=false so that librist fails to configure instead of silently falling back to the bundled copy if Mbed TLS is not found. Refs obs-rust/obs-studio#1121 Co-Authored-By: Claude Opus 5.5 <[email protected]>
58f6233 to
44af41c
Compare
|
Coordinator: rebased onto master, which now has the libvpx/NASM fix from #5, so the Windows FFmpeg build reruns (per obs-rust/obs-studio#1121). |
zackees
left a comment
There was a problem hiding this comment.
Coordinator review: LGTM. Mbed TLS 3.6.4 -> 3.6.7 on all three platforms with the re-hashed threading patch. librist on Windows now links the Mbed TLS from 60-mbedtls.ps1 (builtin off, fallback off, -lbcrypt for the static mbedcrypto entropy source) so only one Mbed TLS ships. CI green after the rebase. Verdict: approve.
* Update libsrt to v1.5.7 Update libsrt from v1.5.3 to v1.5.7 (commit 899348d8318e, tag v1.5.7) for three critical public advisories: * GHSA-6xg9-784j-24rm (CVE-2026-55869): KMREQ/KMRSP stack-based buffer overflow, fixed in v1.5.6 * GHSA-4mc6-qmpp-g7gw (CVE-2026-55868): encryption state machine downgrade, fixed in v1.5.6 * GHSA-m96h-3rc9-xx6h: heap buffer overflow, fixed in v1.5.7 0001-enable-proper-cmake-build-types.patch does not apply to v1.5.7. It is now the same file as in obs-rust/obs-deps (rebased onto v1.5.7 in obs-rust/obs-deps#1), so both repositories carry one patch. The change is the same for the non-Debug build types; for Debug it keeps v1.5.7's rule that _DEBUG needs ENABLE_ASSERT. The build options are unchanged. Refs obs-rust/obs-studio#2372 Co-Authored-By: Claude Opus 5.5 <[email protected]> * Update Mbed TLS to 3.6.7 Update Mbed TLS from 3.6.4 to 3.6.7 (release tarball mbedtls-3.6.7.tar.bz2, SHA-256 a7e8bcbec0e6...) for the public advisories that affect the RTMPS client, as obs-rust/obs-deps#3 did for Windows and macOS. 0001-array-bounds-error-fix.patch still applies. Refs obs-rust/obs-studio#1121 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Zachary Vorhies <[email protected]>
Description
Update Mbed TLS from 3.6.4 to 3.6.7 in deps.ffmpeg (macOS/Linux
60-mbedtls.zsh, Windows60-mbedtls.ps1), and build librist on Windows against that Mbed TLS instead of the old copy bundled with librist (70-librist.ps1).0001-enable-posix-threading-support.patch(macOS/Linux): rebased. The change is the same (MBEDTLS_THREADING_PTHREADandMBEDTLS_THREADING_Con). The old second hunk applied only with fuzz 2, on 3.6.4 as well, because a context line changed from "mbed TLS" to "Mbed TLS". The new file applies with no fuzz and gives exactly the samembedtls_config.has the old one did with fuzz. Both hash entries in60-mbedtls.zshare updated.0002-enable-dtls-srtp-support.patchand0001-enable-dtls-srtp-support-windows.patch: unchanged. They apply with no fuzz (offset only). Both are still needed: 3.6.7 still ships withMBEDTLS_SSL_DTLS_SRTPoff, and libdatachannel needs it for WHIP/WebRTC.70-librist.ps1passed-Dbuiltin_mbedtls=true, which compiles the Mbed TLS sources bundled in librist 0.2.7'scontrib/mbedtls. That copy is Mbed TLS 2.26.0 (2021, from the end-of-life 2.x line), so Windows RIST encryption was not using obs-deps' Mbed TLS at all. librist now builds against the Mbed TLS from60-mbedtls.ps1, as it already does on macOS:-Dbuiltin_mbedtls=false, plus-Dfallback_builtin=false. Without the second option, librist silently falls back to the bundled 2.26.0 copy when it can't find Mbed TLS (checked: it does exactly that). With it, configure fails instead.mbedtls-<target>.txt, written byConfigure, gives the include and library paths andbcrypt. The obs-deps Mbed TLS is static on Windows, and its entropy source callsBCryptGenRandom, which needsbcrypt.lib(Mbed TLS's own CMake adds it the same way, and so did the libsrt Windows patches).contrib/mbedtlswould mean a multi-megabyte patch with a rewritten source list for the 3.x layout, carried until librist itself is updated, and it would still need its own bump next time. The switch is a few lines, matches macOS, and future Mbed TLS updates in obs-deps then cover librist too. librist 0.2.7 already builds against Mbed TLS 3.x on macOS and in the Linux AppImage.Motivation and Context
Mbed TLS 3.6.7 (and 3.6.5/3.6.6 before it) fixes public advisories on the RTMPS client path (obs-outputs librtmp: certificate and handshake checks). Tracked in obs-rust/obs-studio#1121:
x509_inet_pton_ipv6()(IPv6 server addresses).The same Mbed TLS also serves libsrt, libdatachannel (WHIP DTLS) and, on macOS and now Windows, librist. The Linux AppImage gets the same Mbed TLS update through obs-rust/obs-studio-libs, validated A/B with the full app (RTMPS certificate cases, SRT and RIST encryption).
How Has This Been Tested?
Source.
mbedtls-3.6.7resolves to 068ff080b369adfac81509f9b57b2afabaf82dc5 on github.com/Mbed-TLS/mbedtls, the same commit asv3.6.7, and mbedtls-3.6.4 is an ancestor of it. The official release filembedtls-3.6.7.tar.bz2matches the release'smbedtls-3.6.7-sha256sum.txt(a7e8bcbe…12d11f6), and its tree is identical to the tag checkout with itsframeworksubmodule (diff -r, no differences). The tags are unsigned and Mbed TLS publishes no release signature, so that comparison is the check available.Patches. Each patch was applied to a fresh export of the tag with GNU patch, using the same steps as
apply_patchandSafe-Patch: the hash check, a reverse dry run, then-g 0 -f -p1. All three apply with--fuzz=0, and after applying, the reverse dry run detects them, so a second run skips them. The Windows patch was applied with--binaryto a CRLF copy ofmbedtls_config.h, the waypatch.exe --binarysees it. The patched header definesMBEDTLS_THREADING_PTHREAD,MBEDTLS_THREADING_C(macOS/Linux) andMBEDTLS_SSL_DTLS_SRTP(all).Build (Linux x86_64, clang 22, CMake 4.4, Ninja, meson 1.12). obs-deps does not build Linux packages, and the host has no zsh, so the
linux-x86_64Release path of60-mbedtls.zsh,60-srt.zshand70-librist.zshwas reproduced in bash with the same flags and options. Each set was built with Mbed TLS 3.6.4 (the current pin and patches) and 3.6.7 (this PR):mbedcrypto found: YES 3.6.7;builtin_mbedtls=false,fallback_builtin=false, pkg-config disabled, paths only from the extra machine file):Library mbedcrypto found: YES, and librist NEEDslibmbedcrypto.so.16from the obs-deps prefix. It also works when the file is passed as a second--cross-file, as the Windows script does, and with only the staticlibmbedcrypto.apresent, the Windows situation: then librist embeds 3.6.7 code (3.6.7-only symbols such aspsa_random_reseed) and nothing from 2.26.0;builtin_mbedtls=true): the library contains "mbed TLS 2.26.0" and 2.x-only functions such asmbedtls_arc4_crypt. Its staticlibrist.aalso exports 560 globalmbedtls_*functions, the same names as obs-deps' ownmbedcrypto.ABI, 3.6.4 → 3.6.7 (obs-deps configuration). The sonames are unchanged (
libmbedcrypto.so.16,libmbedx509.so.7,libmbedtls.so.21). Nothing is removed; 15, 2 and 2 functions are added. Everymbedtls_/psa_symbol that libsrt 1.5.7 (14), libsrt 1.5.2 (14) and librist (40) import is exported by 3.6.7, andldd -rreports no undefined symbols. libeverest and libp256m are still built, whichbuild-deps.zshexpects.Test suites, run on this build configuration (threading and DTLS-SRTP on, which the Linux AppImage's own validation didn't cover):
ctest, everytest_suite_*, ENABLE_TESTING with the obs-deps patches): 3.6.7 passes 140/140 (43989 test cases, 0 failed, 11673 skipped by configuration); 3.6.4 passes 135/135.test-srtagainst Mbed TLS 3.6.7: 277/277 passed (including the mbedTLS CRYSPR crypto tests). The result is the same against 3.6.4.meson test, with Mbed TLS found the new Windows way, run serially 3 times each: 13/13 pass plus the 4 expected failures, on 3.6.7, on 3.6.4 and with the bundled 2.26.0. That covers the encryption tests (AES-128 and AES-256, both connection directions), the four mismatched-encryption cases that must fail, and unicast with 0/10/25 % packet loss.Not tested here. No Windows or macOS build was run: the Windows test machine was not available, and there is no macOS machine. The MSVC side of the librist change (cl/link with the extra cross file and
bcrypt.lib) has therefore not been compiled. The meson logic it relies on was checked on Linux as above, and meson translates-L/-lto/LIBPATH:and.libfor MSVC. If Mbed TLS isn't found, the Windows librist build now stops at configure instead of falling back.Follow-ups
Library mbedcrypto found: YES.CMakePresets.jsonto that release.This change is independent of the libsrt update in #1 and the FFmpeg update in #2. It touches different files, and they can merge in any order.
Types of changes
AI note: Claude Code (Claude Opus 5.5) wrote the patch and script changes, the checks, the commit message and this text under the submitter's direction, and ran the builds and tests above on the submitter's machines.
🤖 Generated with Claude Code