diff -Nru libzstd-1.5.7+dfsg/debian/changelog
libzstd-1.6.0+dfsg/debian/changelog
--- libzstd-1.5.7+dfsg/debian/changelog 2026-08-01 18:42:00.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/changelog 2026-12-02 23:20:00.000000000 +0100
@@ -1,3 +1,37 @@
+libzstd (1.6.0+dfsg-0.4) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Upload to unstable.
+
+ -- Matthias Klose <[email protected]> Wed, 02 Dec 2026 23:20:00 +0100
+
+libzstd (1.6.0+dfsg-0.3) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix fuzzer test on big-endian targets, patch taken from upstream.
+
+ -- Matthias Klose <[email protected]> Wed, 02 Dec 2026 16:41:40 +0100
+
+libzstd (1.6.0+dfsg-0.2) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix saving/restoring zstd release build binary.
+
+ -- Matthias Klose <[email protected]> Wed, 02 Dec 2026 12:47:46 +0100
+
+libzstd (1.6.0+dfsg-0.1) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * New upstream version.
+ - Addresses CVE-2026-124851. Closes: #1155105.
+ - Fixes ftbfs with -Werror=deprecated-declarations. Closes: #1155268.
+ - Fixes compression failures on 32-bit architectures. Closes: #1131441.
+ * Don't ship the zstd binary as a debug build. Closes: #1070168.
+ * Fix build with glibc 2.44 (Aurelien Jarno). Closes: #1150137.
+ * d/libzstd-dev.install: Use cmake files installed by upstream.
+
+ -- Matthias Klose <[email protected]> Wed, 02 Dec 2026 11:17:38 +0100
+
libzstd (1.5.7+dfsg-4) unstable; urgency=medium
* Declare compliance with Policy 4.7.4 with no changes.
diff -Nru libzstd-1.5.7+dfsg/debian/libzstd-dev.install
libzstd-1.6.0+dfsg/debian/libzstd-dev.install
--- libzstd-1.5.7+dfsg/debian/libzstd-dev.install 2026-08-01
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/libzstd-dev.install 2026-12-02
11:46:49.000000000 +0100
@@ -1,6 +1,5 @@
-obj-${DEB_HOST_GNU_TYPE}/zstdConfig*.cmake
usr/lib/${DEB_HOST_MULTIARCH}/cmake/zstd
-obj-${DEB_HOST_GNU_TYPE}/CMakeFiles/Export/*/zstdTargets*.cmake
usr/lib/${DEB_HOST_MULTIARCH}/cmake/zstd
usr/include
usr/lib/${DEB_HOST_MULTIARCH}/*.a
usr/lib/${DEB_HOST_MULTIARCH}/*.so
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
+usr/lib/${DEB_HOST_MULTIARCH}/cmake
diff -Nru
libzstd-1.5.7+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
libzstd-1.6.0+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
---
libzstd-1.5.7+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
2026-08-01 18:03:20.000000000 +0200
+++
libzstd-1.6.0+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
2026-12-02 11:20:39.000000000 +0100
@@ -13,4 +13,4 @@
+#!/bin/bash
set -e # exit immediately on error
- # set -x # print commands before execution (debug)
+ set -x # print commands before execution (debug)
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0008-Address-embedded-zlib.patch
libzstd-1.6.0+dfsg/debian/patches/0008-Address-embedded-zlib.patch
--- libzstd-1.5.7+dfsg/debian/patches/0008-Address-embedded-zlib.patch
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0008-Address-embedded-zlib.patch
2026-12-02 11:20:43.000000000 +0100
@@ -2,7 +2,7 @@
Author: Sascha Steinbiss <[email protected]>
--- a/zlibWrapper/Makefile
+++ b/zlibWrapper/Makefile
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,7 @@ ZLIB_PATH ?= .
ZSTDLIBDIR = ../lib
ZSTDLIBRARY = $(ZSTDLIBDIR)/libzstd.a
ZLIBWRAPPER_PATH = .
@@ -11,9 +11,9 @@
EXAMPLE_PATH = examples
PROGRAMS_PATH = ../programs
TEST_FILE = ../doc/zstd_compression_format.md
-@@ -83,14 +83,14 @@
- #.c.o:
- # $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+@@ -93,14 +93,14 @@ gzfinishtest: gzfinishtest.o zstd_zlibwr
+ gzfinishtest_zstd: gzfinishtest.o zstdTurnedOn_zlibwrapper.o $(GZFILES)
$(ZSTDLIBRARY)
+ $(LINK.o) $^ $(LDLIBS) $(OUTPUT_OPTION)
-minigzip: minigzip.o zstd_zlibwrapper.o $(GZFILES) $(ZSTDLIBRARY)
+minigzip: minigzip.o zstd_zlibwrapper.o $(ZSTDLIBRARY)
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch
libzstd-1.6.0+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch
--- libzstd-1.5.7+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch
2026-12-02 11:20:45.000000000 +0100
@@ -2,7 +2,7 @@
From: Alex Mestiashvili <[email protected]>
--- a/tests/playTests.sh
+++ b/tests/playTests.sh
-@@ -1854,8 +1854,13 @@
+@@ -1971,8 +1971,13 @@ roundTripTest -g8M "19 --long"
roundTripTest -g5000000000 -P99 "1 --zstd=wlog=25"
roundTripTest -g3700000000 -P0 "1 --zstd=strategy=6,wlog=25" # ensure
btlazy2 can survive an overflow rescale
@@ -18,7 +18,7 @@
println "\n===> zstd long, long distance matching round-trip tests "
roundTripTest -g270000000 "1 --single-thread --long"
-@@ -1872,9 +1877,14 @@
+@@ -1989,9 +1994,14 @@ then
println "\n===> zstdmt long round-trip tests "
roundTripTest -g80000000 -P99 "19 -T2" " "
roundTripTest -g5000000000 -P99 "1 -T2" " "
diff -Nru
libzstd-1.5.7+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch
libzstd-1.6.0+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch
--- libzstd-1.5.7+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch
2026-12-02 11:20:49.000000000 +0100
@@ -6,7 +6,7 @@
From: Alex Mestiashvili <[email protected]>
--- a/tests/playTests.sh
+++ b/tests/playTests.sh
-@@ -494,14 +494,19 @@
+@@ -542,14 +542,19 @@ cp tmp tmp2
zstd -v --rm tmp2 -o tmp2.zst -c > tmp3.zst
test -f tmp2
test -f tmp3.zst
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch
libzstd-1.6.0+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch
--- libzstd-1.5.7+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch
2026-12-02 11:20:51.000000000 +0100
@@ -2,7 +2,7 @@
From: Helmut Grohne <[email protected]>
--- a/programs/util.c
+++ b/programs/util.c
-@@ -29,7 +29,7 @@
+@@ -45,7 +45,7 @@
#else
# include <unistd.h> /* chown, stat */
# include <sys/stat.h> /* utimensat, st_mtime */
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch
libzstd-1.6.0+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch
--- libzstd-1.5.7+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch
2026-12-02 11:20:56.000000000 +0100
@@ -5,7 +5,7 @@
--- a/programs/util.c
+++ b/programs/util.c
-@@ -30,7 +30,7 @@
+@@ -46,7 +46,7 @@
# include <unistd.h> /* chown, stat */
# include <sys/stat.h> /* utimensat, st_mtime */
# if (PLATFORM_POSIX_VERSION >= 200809L && (defined(st_mtime) ||
defined(__alpha__))) \
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0022-tests-timeout.patch
libzstd-1.6.0+dfsg/debian/patches/0022-tests-timeout.patch
--- libzstd-1.5.7+dfsg/debian/patches/0022-tests-timeout.patch 2026-08-01
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0022-tests-timeout.patch 2026-12-02
11:22:25.000000000 +0100
@@ -8,11 +8,11 @@
--- a/tests/cli-tests/run.py
+++ b/tests/cli-tests/run.py
-@@ -640,7 +640,7 @@
+@@ -640,7 +640,7 @@ if __name__ == "__main__":
help="Preserve the scratch directory TEST_DIR/scratch/ for debugging
purposes."
)
parser.add_argument("--verbose", action="store_true", help="Verbose test
output.")
-- parser.add_argument("--timeout", default=200, type=int, help="Test case
timeout in seconds. Set to 0 to disable timeouts.")
+- parser.add_argument("--timeout", default=800, type=int, help="Test case
timeout in seconds. Set to 0 to disable timeouts.")
+ parser.add_argument("--timeout", default=60 * 50, type=int, help="Test
case timeout in seconds. Set to 0 to disable timeouts.")
parser.add_argument(
"--exec-prefix",
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0023-cmake-min-3.13.patch
libzstd-1.6.0+dfsg/debian/patches/0023-cmake-min-3.13.patch
--- libzstd-1.5.7+dfsg/debian/patches/0023-cmake-min-3.13.patch 2026-08-01
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0023-cmake-min-3.13.patch 2026-12-02
11:22:29.000000000 +0100
@@ -16,5 +16,5 @@
-cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
- # As of 2018-12-26 ZSTD has been validated to build with cmake version 3.13.2
new policies.
- # Set and use the newest cmake policies that are validated to work
+ #-----------------------------------------------------------------------------
+ # Setup CMake environment
diff -Nru
libzstd-1.5.7+dfsg/debian/patches/74739dbaeb7eaddbd9932409432a6364ee1a3c87.diff
libzstd-1.6.0+dfsg/debian/patches/74739dbaeb7eaddbd9932409432a6364ee1a3c87.diff
---
libzstd-1.5.7+dfsg/debian/patches/74739dbaeb7eaddbd9932409432a6364ee1a3c87.diff
1970-01-01 01:00:00.000000000 +0100
+++
libzstd-1.6.0+dfsg/debian/patches/74739dbaeb7eaddbd9932409432a6364ee1a3c87.diff
2026-12-02 16:41:09.000000000 +0100
@@ -0,0 +1,114 @@
+https://github.com/meta/zstd/commit/74739dbaeb7eaddbd9932409432a6364ee1a3c87
+
+diff --git a/tests/fuzzer.c b/tests/fuzzer.c
+index d5fdf17ceb4..2ab2c5d934d 100644
+--- a/tests/fuzzer.c
++++ b/tests/fuzzer.c
+@@ -3018,6 +3018,31 @@ static unsigned test_sessionReset(unsigned testNb)
+ return testNb;
+ }
+
++/* Mirrors the slot selection of the DDict hashset in zstd_decompress.c, for a
++ * table of 64 slots. The library hashes the in-memory bytes of the dictID, so
++ * the slot of a given ID depends on the host's endianness. Tests must not
++ * hard-code IDs that collide: find them with this function instead. */
++static size_t FUZ_ddictHashSlot64(U32 dictID)
++{
++ return (size_t)(XXH64(&dictID, sizeof(dictID), 0) & 63);
++}
++
++/* Finds two distinct nonzero dictIDs that fit in one byte (so they can be
++ * patched into a frame header with a 1-byte dictID field) and that both hash
++ * to the last slot (63) of a 64-slot DDict hashset. Returns 0 on success. */
++static int FUZ_findLastSlotCollidingIDs(U32* first, U32* second)
++{
++ U32 id;
++ U32 found = 0;
++ for (id = 1; id < 256; ++id) {
++ if (FUZ_ddictHashSlot64(id) != 63) continue;
++ if (found == 0) *first = id;
++ else *second = id;
++ if (++found == 2) return 0;
++ }
++ return 1;
++}
++
+ static void FUZ_mdict_testZeroID(void)
+ {
+ U32 const zero = 0;
+@@ -3028,7 +3053,7 @@ static void FUZ_mdict_testZeroID(void)
+ BYTE frame[32], out[32];
+ size_t n, r;
+ /* Find a nonzero ID in raw dictionary 0's initial 64-slot hash bucket. */
+- while ((XXH64(&id, sizeof(id), 0) & 63) != (XXH64(&zero, sizeof(zero), 0)
& 63))
++ while (FUZ_ddictHashSlot64(id) != FUZ_ddictHashSlot64(zero))
+ ++id;
+ full = FUZ_mdict_createDict(id, 'A');
+ n = FUZ_mdict_makeFrame(frame, id, 0);
+@@ -6721,9 +6746,11 @@ static int basicUnitTests(U32 const seed, double
compressibility)
+ {
+ /* Simplified repro for T283341343 - relies on ASAN to catch OOB
read.
+ * Original bug: probe does idx &= mask; idx++ -> idx can become
64 OOB.
+- * IDs 3 and 47 both hash XXH64(id) & 63 == 63 (last slot).
+- * Setup: register dict 3 (occupies slot 63), then decompress
frame
+- * whose header dictID is patched to 47 (collides to same slot).
++ * Two IDs that both hash to slot 63 (last slot) are searched for,
++ * because the hash depends on endianness (3 and 47 on
little-endian).
++ * Setup: register the victim dict (occupies slot 63), then
decompress
++ * a frame whose header dictID is patched to the attacker ID
(collides
++ * to the same slot).
+ * Buggy getDDict reads slot 64 OOB. With ASAN=1 this is reported
as
+ * heap-buffer-overflow even though glibc would see 0 and return
+ * "dictionary mismatch". No custom allocator needed.
+@@ -6746,10 +6773,12 @@ static int basicUnitTests(U32 const seed, double
compressibility)
+ int pos;
+ int i;
+
+- victimID = 3;
+- attackerID = 47;
+- victimIdx = XXH64(&victimID, sizeof(victimID), 0) & 63;
+- attackerIdx = XXH64(&attackerID, sizeof(attackerID), 0) & 63;
++ if (FUZ_findLastSlotCollidingIDs(&victimID, &attackerID)) {
++ DISPLAY("no colliding dictIDs found\n");
++ goto _output_error;
++ }
++ victimIdx = FUZ_ddictHashSlot64(victimID);
++ attackerIdx = FUZ_ddictHashSlot64(attackerID);
+ if (victimIdx != 63 || attackerIdx != 63) {
+ DISPLAY("hash assumption broken\n");
+ goto _output_error;
+@@ -6786,7 +6815,7 @@ static int basicUnitTests(U32 const seed, double
compressibility)
+ goto _oob_error2;
+ }
+
+- /* Patch dictID in frame header to attackerID (47) */
++ /* Patch dictID in frame header to attackerID */
+ frame = (BYTE*)compressedBuffer;
+ fhd = frame[4];
+ dictIDSizeCode = fhd & 3;
+@@ -6830,7 +6859,7 @@ static int basicUnitTests(U32 const seed, double
compressibility)
+
+ DISPLAYLEVEL(3, "test%3i : DDict hashset OOB write T283341343 (ASAN)
: ", testNb++);
+ {
+- /* Write path version of above: same colliding IDs 3 and 47 →
slot 63.
++ /* Write path version of above: same colliding IDs → slot 63.
+ * Insertion does while(table[idx]!=NULL) { idx&=mask; idx++; }
+ * Second insertion with colliding ID should wrap to slot 0, but
buggy code
+ * writes to slot 64 OOB (8-byte write). With ASAN this is
heap-buffer-overflow
+@@ -6846,10 +6875,12 @@ static int basicUnitTests(U32 const seed, double
compressibility)
+ ZSTD_DDict* victimDDict2;
+ ZSTD_DDict* attackerDDict2;
+
+- victimID2 = 3;
+- attackerID2 = 47;
+- vIdx2 = XXH64(&victimID2, sizeof(victimID2), 0) & 63;
+- aIdx2 = XXH64(&attackerID2, sizeof(attackerID2), 0) & 63;
++ if (FUZ_findLastSlotCollidingIDs(&victimID2, &attackerID2)) {
++ DISPLAY("no colliding dictIDs found for write test\n");
++ goto _output_error;
++ }
++ vIdx2 = FUZ_ddictHashSlot64(victimID2);
++ aIdx2 = FUZ_ddictHashSlot64(attackerID2);
+ if (vIdx2 != 63 || aIdx2 != 63) {
+ DISPLAY("hash assumption broken for write test\n");
+ goto _output_error;
diff -Nru libzstd-1.5.7+dfsg/debian/patches/fix-glibc-2.44-build.diff
libzstd-1.6.0+dfsg/debian/patches/fix-glibc-2.44-build.diff
--- libzstd-1.5.7+dfsg/debian/patches/fix-glibc-2.44-build.diff 1970-01-01
01:00:00.000000000 +0100
+++ libzstd-1.6.0+dfsg/debian/patches/fix-glibc-2.44-build.diff 2026-12-02
11:37:48.000000000 +0100
@@ -0,0 +1,11 @@
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -253,7 +253,7 @@ endif
+
+ ## zstd-small: minimal target, supporting only zstd compression and
decompression. no bench. no legacy. no other format.
+ CLEAN += zstd-small zstd-frugal
+-zstd-small: CFLAGS = -Os -Wl,-s
++zstd-small: CFLAGS += -Os -Wl,-s
+ zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c
fileio.c fileio_asyncio.c
+ $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE
-UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=0 $^ -o $@$(EXT)
+
diff -Nru libzstd-1.5.7+dfsg/debian/patches/series
libzstd-1.6.0+dfsg/debian/patches/series
--- libzstd-1.5.7+dfsg/debian/patches/series 2026-08-01 18:03:20.000000000
+0200
+++ libzstd-1.6.0+dfsg/debian/patches/series 2026-12-02 16:41:25.000000000
+0100
@@ -8,3 +8,5 @@
0022-tests-timeout.patch
0023-cmake-min-3.13.patch
0024-no-lessopen-test.patch
+fix-glibc-2.44-build.diff
+74739dbaeb7eaddbd9932409432a6364ee1a3c87.diff
diff -Nru libzstd-1.5.7+dfsg/debian/rules libzstd-1.6.0+dfsg/debian/rules
--- libzstd-1.5.7+dfsg/debian/rules 2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/rules 2026-12-02 12:46:42.000000000 +0100
@@ -41,6 +41,7 @@
dh_auto_clean \
--buildsystem=cmake \
--sourcedir=$(CURDIR)/build/cmake
+ rm -f debian/zstd.release
execute_after_dh_auto_configure:
dh_auto_configure \
@@ -52,8 +53,17 @@
execute_after_dh_auto_build:
dh_auto_build -D contrib/pzstd
+# The upstream test suite rebuilds programs/zstd in place with DEBUGLEVEL=2
+# (assert() and DEBUGLOG enabled), which dh_auto_install would then ship.
+# Keep the release binary aside and put it back once the tests have run.
+execute_before_dh_auto_test:
+ cp -p obj-*/programs/zstd debian/zstd.release
+
+execute_after_dh_auto_test:
+ cp -p debian/zstd.release obj-*/programs/zstd
+
override_dh_auto_install:
- dh_auto_install -- libdir=/usr/lib/${DEB_HOST_MULTIARCH}
+ libdir=/usr/lib/${DEB_HOST_MULTIARCH} dh_auto_install
dh_auto_install -D contrib/pzstd
override_dh_makeshlibs: