CVE-2026-124851, where malformed input during streaming decompression may expose uninitialized memory or data from previous decompressions, affects the zstd version in -stable. Updating to 1.6.0 does not seem suitable for -stable due to the major shlib bump.
The actual upstream fix is relatively small: https://github.com/meta/zstd/pull/5023 Proposal is to backport this to -stable. 'make test' passes all tests on amd64. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/archivers/zstd/Makefile,v diff -u -p -r1.49 Makefile --- Makefile 17 May 2025 17:14:13 -0000 1.49 +++ Makefile 24 Nov 2026 06:01:55 -0000 @@ -1,7 +1,7 @@ COMMENT = zstandard fast real-time compression algorithm V = 1.5.7 -REVISION = 0 +REVISION = 1 DISTNAME = zstd-${V} SHARED_LIBS = zstd 7.0 # 1.5.7 @@ -18,6 +18,10 @@ PERMIT_PACKAGE = Yes WANTLIB = c lz4 lzma pthread z SITES = https://github.com/facebook/zstd/releases/download/v${V}/ + +SITES.p = https://github.com/meta/zstd/commit/ +PATCHFILES.p = decompress-stale-literal-wrap-{}0c9d297.patch +PATCH_DIST_STRIP = -p1 LIB_DEPENDS = archivers/lz4 \ archivers/xz Index: distinfo =================================================================== RCS file: /cvs/ports/archivers/zstd/distinfo,v diff -u -p -r1.29 distinfo --- distinfo 27 Feb 2025 20:28:59 -0000 1.29 +++ distinfo 24 Nov 2026 06:01:55 -0000 @@ -1,2 +1,4 @@ +SHA256 (decompress-stale-literal-wrap-0c9d297.patch) = kJId9EXTSoAhdcsy6Sn/k7PVA37SU0Kr1VmA4uIXYis= SHA256 (zstd-1.5.7.tar.gz) = 6zPlH0mhXgI5UM14Jcp0pKK0Pbg1SCWsJPwbfuCeb6M= +SIZE (decompress-stale-literal-wrap-0c9d297.patch) = 4807 SIZE (zstd-1.5.7.tar.gz) = 2434947
