Version in base suite: 1.6.3-3 Base version: apr-util_1.6.3-3 Target version: apr-util_1.6.3-3+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/a/apr-util/apr-util_1.6.3-3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/a/apr-util/apr-util_1.6.3-3+deb13u1.dsc changelog | 25 patches/CVE-2025-49506.patch | 302 +++++ patches/CVE-2026-32327.patch | 2157 ++++++++++++++++++++++++++++++++++++++ patches/CVE-2026-32327_pre1.patch | 26 patches/CVE-2026-34191.patch | 49 patches/CVE-2026-34501.patch | 120 ++ patches/CVE-2026-34502.patch | 98 + patches/series | 6 8 files changed, 2783 insertions(+) Unrecognised file line in .dsc: -----BEGIN PGP SIGNATURE----- dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpr5iiv_15/apr-util_1.6.3-3.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpr5iiv_15/apr-util_1.6.3-3+deb13u1.dsc: no acceptable signature found diff -Nru apr-util-1.6.3/debian/changelog apr-util-1.6.3/debian/changelog --- apr-util-1.6.3/debian/changelog 2024-08-04 10:02:26.000000000 +0000 +++ apr-util-1.6.3/debian/changelog 2026-08-09 16:26:22.000000000 +0000 @@ -1,3 +1,28 @@ +apr-util (1.6.3-3+deb13u1) trixie-security; urgency=high + + * Non-maintainer upload on behalf of Apache Team. + (Closes: #1143837) + * Fix CVE-2025-49506: + Function apr_password_validate() was not constant-time with + regards to hashes or passwords comparisons, potentially leaking + their content via a side channel timing attack. + * Fix CVE-2026-32327: + A stack recursion attack against any library consumer + which parses XML from untrusted sources and uses the + apr_xml_quote_elem() function + * Fix CVE-2026-34191: + Improper Neutralization of Special Elements used + in an SQL Command (SQL Injection) vulnerability + in Apache Portable Runtime Utility via apr_dbd_oracle provider. + * Fix CVE-2026-34501: + Heap-based Buffer Overflow vulnerability in Apache Portable + Runtime Utility redis client. + * Fix CVE-2026-34502: + Heap-based Buffer Overflow vulnerability in Apache Portable + Runtime Utility memcached client + + -- Bastien Roucariès Sun, 09 Aug 2026 18:26:22 +0200 + apr-util (1.6.3-3) unstable; urgency=medium * Fix db 5.3 detection with gcc 14. Closes: #1074812 diff -Nru apr-util-1.6.3/debian/patches/CVE-2025-49506.patch apr-util-1.6.3/debian/patches/CVE-2025-49506.patch --- apr-util-1.6.3/debian/patches/CVE-2025-49506.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2025-49506.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,302 @@ +From: Eric Covener +Date: Mon, 3 Aug 2026 12:10:13 +0000 +Subject: Merge r1936804 from aprutil 1.7.x: + +use timing safe comparison + +Submitted By: ylavic +Reviewed By: ylavic, rpluem, covener + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936805 13f79535-47bb-0310-9956-ffa450edef68 +origin: https://github.com/apache/apr-util/commit/f77a20761cb15686f8d4de5b5eafc534ae24b19e +bug: https://lists.apache.org/thread/2v8o3bj9pb7lfcr57bdnjg9xfkj04mg5 +--- + crypto/apr_crypto.c | 60 ++++++++++++++++++++--- + crypto/apr_passwd.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++----- + 2 files changed, 176 insertions(+), 19 deletions(-) + +diff --git a/crypto/apr_crypto.c b/crypto/apr_crypto.c +index 9ba190e..ca3f088 100644 +--- a/crypto/apr_crypto.c ++++ b/crypto/apr_crypto.c +@@ -21,6 +21,7 @@ + #include "apu.h" + #include "apr_pools.h" + #include "apr_dso.h" ++#include "apr_version.h" + #include "apr_strings.h" + #include "apr_hash.h" + #include "apr_thread_mutex.h" +@@ -173,19 +174,64 @@ APU_DECLARE(apr_status_t) apr_crypto_memzero(void *buffer, apr_size_t size) + return APR_SUCCESS; + } + ++/* Borrow this from APR-1.8 if not available */ ++#if !APR_VERSION_AT_LEAST(1,8,0) ++ ++/* A volatile variable which is always zero but allows to block the compiler ++ * from optimizing or eliding code using it. Volatile forces the compiler to ++ * emit a memory load for which no value can be assumed, so for instance an ++ * add/sub/xor/or with "optblocker" is a noop that will hide the result to ++ * the optimizer. ++ */ ++static volatile const apr_uint32_t optblocker; ++ ++/* Return whether x is not zero, with no branching controlled by x. ++ * ++ * Taken from the cryptoint library (public domain) by D. J. Bernstein, ++ * which provides timing attacks safe integer operations/primitives. ++ * Code: ++ * https://lib.mceliece.org/libmceliece-20250507/cryptoint/crypto_uint32.h ++ * Paper: ++ * https://cr.yp.to/papers/cryptoint-20250424.pdf ++ */ ++#if __has_attribute(always_inline) ++__attribute__((always_inline)) ++#endif ++static APR_INLINE int test_nonzero_timingsafe(apr_uint32_t x) ++{ ++ x |= -x; /* sets the most significant bit unless x == 0 */ ++ ++ /* shift bit 31 (MSB) to bit 0 */ ++ x >>= 32-6; /* keep 6 bits */ ++ x += optblocker; /* lose the optimizer */ ++ x >>= 5; /* keep the (original) MSB only */ ++ ++ /* x is now 0 or 1 */ ++ return x & INT_MAX; ++} ++ ++#endif /* !APR_VERSION_AT_LEAST(1,8,0) */ ++ + APU_DECLARE(int) apr_crypto_equals(const void *buf1, const void *buf2, + apr_size_t size) + { +- const unsigned char *p1 = buf1; +- const unsigned char *p2 = buf2; +- unsigned char diff = 0; +- apr_size_t i; ++#if APR_VERSION_AT_LEAST(1,8,0) ++ return apr_memeq_timingsafe(buf1, buf2, size); ++#else ++ apr_uint32_t diff = 0; ++ volatile apr_size_t count = size; /* prevent loop unrolling */ ++ apr_size_t i = 0; + +- for (i = 0; i < size; ++i) { +- diff |= p1[i] ^ p2[i]; ++ for (; i < count; ++i) { ++ const unsigned char c1 = ((volatile const unsigned char *)buf1)[i]; ++ const unsigned char c2 = ((volatile const unsigned char *)buf2)[i]; ++ ++ diff |= c1 ^ c2; /* sets diff to non-zero whenever c1 != c2 */ + } + +- return 1 & ((diff - 1) >> 8); ++ /* (diff == 0) <=> (diff != 0) ^ 1 */ ++ return test_nonzero_timingsafe(diff) ^ 1; ++#endif + } + + APU_DECLARE(apr_status_t) apr_crypto_get_driver( +diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c +index c961de2..74b5fc1 100644 +--- a/crypto/apr_passwd.c ++++ b/crypto/apr_passwd.c +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + ++#include "apr_version.h" + #include "apr_strings.h" + #include "apr_md5.h" + #include "apr_lib.h" +@@ -39,6 +40,111 @@ + + static const char * const apr1_id = "$apr1$"; + ++#if APR_VERSION_AT_LEAST(1,8,0) ++ ++#define streq_timingsafe apr_streq_timingsafe ++#define strneq_timingsafe apr_strneq_timingsafe ++ ++#else /* borrow code from APR-1.8 if not available */ ++ ++/* A volatile variable which is always zero but allows to block the compiler ++ * from optimizing or eliding code using it. Volatile forces the compiler to ++ * emit a memory load for which no value can be assumed, so for instance an ++ * add/sub/xor/or with "optblocker" is a noop that will hide the result to ++ * the optimizer. ++ */ ++static volatile const apr_uint32_t optblocker; ++ ++/* Return whether x is not zero, with no branching controlled by x. ++ * ++ * Taken from the cryptoint library (public domain) by D. J. Bernstein, ++ * which provides timing attacks safe integer operations/primitives. ++ * Code: ++ * https://lib.mceliece.org/libmceliece-20250507/cryptoint/crypto_uint32.h ++ * Paper: ++ * https://cr.yp.to/papers/cryptoint-20250424.pdf ++ */ ++#if __has_attribute(always_inline) ++__attribute__((always_inline)) ++#endif ++static APR_INLINE int test_nonzero_timingsafe(apr_uint32_t x) ++{ ++ x |= -x; /* sets the most significant bit unless x == 0 */ ++ ++ /* shift bit 31 (MSB) to bit 0 */ ++ x >>= 32-6; /* keep 6 bits */ ++ x += optblocker; /* lose the optimizer */ ++ x >>= 5; /* keep the (original) MSB only */ ++ ++ /* x is now 0 or 1 */ ++ return x & INT_MAX; ++} ++ ++static int streq_timingsafe(const char *sec1, const char *str2) ++{ ++ apr_uint32_t diff = 0; ++ apr_size_t i1 = 0, i2 = 0; ++ ++ for (;; ++i2) { ++ const unsigned char c1 = ((volatile const unsigned char *)sec1)[i1]; ++ const unsigned char c2 = ((volatile const unsigned char *)str2)[i2]; ++ ++ diff |= c1 ^ c2; /* sets diff to non-zero whenever c1 != c2 */ ++ ++ /* Not a shortest/longest match because an attacker would usually know ++ * one of the strings and could then determine the length of the other. ++ * So assume only sec1 and its length are secret and stop the loop at ++ * the end of str2. If sec1 is shorter than str2 the loop will continue ++ * by comparing the rest of str2 with the trailing NUL byte of sec1. ++ * In any case since the diff above is computed up to and including a ++ * NUL byte, only the same content and length will raise match. ++ */ ++ if (!c2) { ++ break; ++ } ++ ++ /* Don't go above sec1's NUL byte */ ++ i1 += test_nonzero_timingsafe(c1); ++ } ++ ++ /* (diff == 0) <=> (diff != 0) ^ 1 */ ++ return test_nonzero_timingsafe(diff) ^ 1; ++} ++ ++static int strneq_timingsafe(const char *sec1, const char *str2, apr_size_t n) ++{ ++ apr_uint32_t diff = 0; ++ volatile apr_size_t count = n; /* prevent loop unrolling */ ++ apr_size_t i1 = 0, i2 = 0; ++ ++ for (; i2 < count; ++i2) { ++ const unsigned char c1 = ((volatile const unsigned char *)sec1)[i1]; ++ const unsigned char c2 = ((volatile const unsigned char *)str2)[i2]; ++ ++ diff |= c1 ^ c2; /* sets diff to non-zero whenever c1 != c2 */ ++ ++ /* Not a shortest/longest match because an attacker would usually know ++ * one of the strings and could then determine the length of the other. ++ * So assume only sec1 and its length are secret and stop the loop at ++ * the end of str2. If sec1 is shorter than str2 the loop will continue ++ * by comparing the rest of str2 with the trailing NUL byte of sec1. ++ * In any case since the diff above is computed up to and including a ++ * NUL byte, only the same content and length will raise match. ++ */ ++ if (!c2) { ++ break; ++ } ++ ++ /* Don't go above sec1's NUL byte */ ++ i1 += test_nonzero_timingsafe(c1); ++ } ++ ++ /* (diff == 0) <=> (diff != 0) ^ 1 */ ++ return test_nonzero_timingsafe(diff) ^ 1; ++} ++ ++#endif /* APR_VERSION_AT_LEAST(1,8,0) */ ++ + #if !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) + #if defined(APU_CRYPT_THREADSAFE) || !APR_HAS_THREADS || \ + defined(CRYPT_R_CRYPTD) || defined(CRYPT_R_STRUCT_CRYPT_DATA) +@@ -86,28 +192,33 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd, + #if !CRYPT_MISSING + char *crypt_pw; + #endif +- if (hash[0] == '$' +- && hash[1] == '2' +- && (hash[2] == 'a' || hash[2] == 'y') +- && hash[3] == '$') { ++ ++ if ((strneq_timingsafe(hash, "$2a$", 4) | /* test both */ ++ strneq_timingsafe(hash, "$2y$", 4))) { ++ /* ++ * The hash was created using [apr_]bcrypt encoding. ++ */ + if (_crypt_blowfish_rn(passwd, hash, sample, sizeof(sample)) == NULL) + return APR_FROM_OS_ERROR(errno); + } +- else if (!strncmp(hash, apr1_id, strlen(apr1_id))) { ++ else if (strneq_timingsafe(hash, apr1_id, strlen(apr1_id))) { + /* + * The hash was created using our custom algorithm. + */ + apr_md5_encode(passwd, hash, sample, sizeof(sample)); + } +- else if (!strncmp(hash, APR_SHA1PW_ID, APR_SHA1PW_IDLEN)) { +- apr_sha1_base64(passwd, (int)strlen(passwd), sample); ++ else if (strneq_timingsafe(hash, APR_SHA1PW_ID, APR_SHA1PW_IDLEN)) { ++ /* ++ * The hash is a (naked) SHA1. ++ */ ++ apr_sha1_base64(passwd, (int)strlen(passwd), sample); + } + else { + /* + * It's not our algorithm, so feed it to crypt() if possible. + */ + #if CRYPT_MISSING +- return (strcmp(passwd, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; ++ return streq_timingsafe(hash, passwd) ? APR_SUCCESS : APR_EMISMATCH; + #elif defined(CRYPT_R_CRYPTD) + apr_status_t rv; + CRYPTD *buffer = malloc(sizeof(*buffer)); +@@ -118,7 +229,7 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd, + if (!crypt_pw) + rv = APR_EMISMATCH; + else +- rv = (strcmp(crypt_pw, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; ++ rv = streq_timingsafe(hash, crypt_pw) ? APR_SUCCESS : APR_EMISMATCH; + free(buffer); + return rv; + #elif defined(CRYPT_R_STRUCT_CRYPT_DATA) +@@ -149,7 +260,7 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd, + if (!crypt_pw) + rv = APR_EMISMATCH; + else +- rv = (strcmp(crypt_pw, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; ++ rv = streq_timingsafe(hash, crypt_pw) ? APR_SUCCESS : APR_EMISMATCH; + free(buffer); + return rv; + #else +@@ -173,14 +284,14 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd, + rv = APR_EMISMATCH; + } + else { +- rv = (strcmp(crypt_pw, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; ++ rv = streq_timingsafe(hash, crypt_pw) ? APR_SUCCESS : APR_EMISMATCH; + } + crypt_mutex_unlock(); + return rv; + } + #endif + } +- return (strcmp(sample, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; ++ return streq_timingsafe(hash, sample) ? APR_SUCCESS : APR_EMISMATCH; + } + + static const char * const bcrypt_id = "$2y$"; diff -Nru apr-util-1.6.3/debian/patches/CVE-2026-32327.patch apr-util-1.6.3/debian/patches/CVE-2026-32327.patch --- apr-util-1.6.3/debian/patches/CVE-2026-32327.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2026-32327.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,2157 @@ +From: Joe Orton +Date: Mon, 3 Aug 2026 12:34:32 +0000 +Subject: Merge r1936807 from 1.7.x: + +limit XML processing depth + +Submitted By: jorton +Reviewed By: jorton, jfclere, ivan + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936815 13f79535-47bb-0310-9956-ffa450edef68 +origin: https://github.com/apache/apr-util/commit/414e12e427c89f135d8ee66ab1203feffd3e2bd8 +bug: https://lists.apache.org/thread/hq27vj8yfno9tkwv0fpj6jksfzgxvth1 +debian-bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143837 +--- + CMakeLists.txt | 3 + + test/data/nesting.xml | 2001 +++++++++++++++++++++++++++++++++++++++++++++++++ + test/testxml.c | 32 + + xml/apr_xml.c | 21 +- + 4 files changed, 2056 insertions(+), 1 deletion(-) + create mode 100644 test/data/nesting.xml + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcbfc58..65b9194 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,6 +288,9 @@ IF(APR_BUILD_TESTAPR) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) ++ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different ++ ${PROJECT_SOURCE_DIR}/test/data/nesting.xml ++ ${PROJECT_BINARY_DIR}/data/nesting.xml) + + IF(TEST_STATIC_LIBS) + SET(whichapr aprutil-1) +diff --git a/test/data/nesting.xml b/test/data/nesting.xml +new file mode 100644 +index 0000000..a4efda8 +--- /dev/null ++++ b/test/data/nesting.xml +@@ -0,0 +1,2001 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 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++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/test/testxml.c b/test/testxml.c +index eed1067..5284f88 100644 +--- a/test/testxml.c ++++ b/test/testxml.c +@@ -20,6 +20,10 @@ + #include "abts.h" + #include "testutil.h" + ++#ifndef APR_XML_MAX_DEPTH ++#define APR_XML_MAX_DEPTH 256 ++#endif ++ + static apr_status_t create_dummy_file_error(abts_case *tc, apr_pool_t *p, + apr_file_t **fd) + { +@@ -166,6 +170,33 @@ static void test_billion_laughs(abts_case *tc, void *data) + apr_file_close(fd); + } + ++static void test_nesting_limit(abts_case *tc, void *data) ++{ ++ apr_file_t *fd; ++ apr_xml_parser *parser = NULL; ++ apr_xml_doc *doc; ++ apr_status_t rv; ++ char errbuf[256], *err; ++ ++ rv = apr_file_open(&fd, "data/nesting.xml", ++ APR_FOPEN_READ, 0, p); ++ APR_ASSERT_SUCCESS(tc, "open nesting.xml", rv); ++ ++ rv = apr_xml_parse_file(p, &parser, &doc, fd, 2000); ++ ABTS_TRUE(tc, rv != APR_SUCCESS); ++ ++ if (parser) { ++ err = apr_xml_parser_geterror(parser, errbuf, sizeof errbuf); ++ ABTS_STR_EQUAL(tc, ++ "The maximum element nesting limit " ++ "(" APR_STRINGIFY(APR_XML_MAX_DEPTH) ")" ++ " was exceeded.", ++ err); ++ } ++ ++ apr_file_close(fd); ++} ++ + static void test_CVE_2009_3720_alpha(abts_case *tc, void *data) + { + apr_xml_parser *xp; +@@ -198,6 +229,7 @@ abts_suite *testxml(abts_suite *suite) + + abts_run_test(suite, test_xml_parser, NULL); + abts_run_test(suite, test_billion_laughs, NULL); ++ abts_run_test(suite, test_nesting_limit, NULL); + abts_run_test(suite, test_CVE_2009_3720_alpha, NULL); + abts_run_test(suite, test_CVE_2009_3720_beta, NULL); + +diff --git a/xml/apr_xml.c b/xml/apr_xml.c +index 2685a9a..a2535f9 100644 +--- a/xml/apr_xml.c ++++ b/xml/apr_xml.c +@@ -61,12 +61,19 @@ struct apr_xml_parser { + int error; /* an error has occurred */ + #define APR_XML_ERROR_EXPAT 1 + #define APR_XML_ERROR_PARSE_DONE 2 +-/* also: public APR_XML_NS_ERROR_* values (if any) */ ++#define APR_XML_ERROR_DEPTH_LIMIT 3 + ++/* also: public APR_XML_NS_ERROR_* values (if any) */ ++ /** depth of element tree. */ ++ unsigned int depth; + XML_Parser xp; /* the actual (Expat) XML parser */ + enum XML_Error xp_err; /* stored Expat error code */ + }; + ++#ifndef APR_XML_MAX_DEPTH ++#define APR_XML_MAX_DEPTH 256 ++#endif ++ + /* struct for scoping namespace declarations */ + typedef struct apr_xml_ns_scope { + const char *prefix; /* prefix used for this ns */ +@@ -154,6 +161,11 @@ static void start_handler(void *userdata, const char *name, const char **attrs) + if (parser->error) + return; + ++ if (++parser->depth > APR_XML_MAX_DEPTH) { ++ parser->error = APR_XML_ERROR_DEPTH_LIMIT; ++ return; ++ } ++ + elem = apr_pcalloc(parser->p, sizeof(*elem)); + + /* prep the element */ +@@ -327,6 +339,8 @@ static void end_handler(void *userdata, const char *name) + if (parser->error) + return; + ++ parser->depth--; ++ + /* pop up one level */ + parser->cur_elem = parser->cur_elem->parent; + } +@@ -499,6 +513,11 @@ APU_DECLARE(char *) apr_xml_parser_geterror(apr_xml_parser *parser, + XML_ErrorString(parser->xp_err), parser->xp_err); + return errbuf; + ++ case APR_XML_ERROR_DEPTH_LIMIT: ++ msg = "The maximum element nesting limit (" ++ APR_STRINGIFY(APR_XML_MAX_DEPTH) ") was exceeded."; ++ break; ++ + case APR_XML_ERROR_PARSE_DONE: + msg = "The parser is not active."; + break; diff -Nru apr-util-1.6.3/debian/patches/CVE-2026-32327_pre1.patch apr-util-1.6.3/debian/patches/CVE-2026-32327_pre1.patch --- apr-util-1.6.3/debian/patches/CVE-2026-32327_pre1.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2026-32327_pre1.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,26 @@ +From: Joe Orton +Date: Tue, 19 Dec 2023 11:20:33 +0000 +Subject: Merge r1914772 from 1.7.x: + +* test/testutil.h: Define APR_ASSERT_SUCCESS for compatibility + with apr trunk. + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1914774 13f79535-47bb-0310-9956-ffa450edef68 +origin: https://github.com/apache/apr-util/commit/dba5d434dba0547478f411d6fa068766455446ce +--- + test/testutil.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/testutil.h b/test/testutil.h +index eaa7e75..4c5e30b 100644 +--- a/test/testutil.h ++++ b/test/testutil.h +@@ -40,6 +40,8 @@ extern apr_pool_t *p; + /* Assert that RV is an APR_SUCCESS value; else fail giving strerror + * for RV and CONTEXT message. */ + void apr_assert_success(abts_case* tc, const char *context, apr_status_t rv); ++#define APR_ASSERT_SUCCESS(tc, ctxt, rv) \ ++ apr_assert_success(tc, ctxt, rv) + + void apr_assert_failure(abts_case* tc, const char *context, + apr_status_t rv, int lineno); diff -Nru apr-util-1.6.3/debian/patches/CVE-2026-34191.patch apr-util-1.6.3/debian/patches/CVE-2026-34191.patch --- apr-util-1.6.3/debian/patches/CVE-2026-34191.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2026-34191.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,49 @@ +From: Eric Covener +Date: Mon, 3 Aug 2026 12:38:04 +0000 +Subject: Merge r1936816 from aprutil 1.7.x: + +Merge r1936814 from apr trunk: + +apr_dbd: oracle escaping + +Reviewed By: covener, jorton, jfclere + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936817 13f79535-47bb-0310-9956-ffa450edef68 +bug: https://lists.apache.org/thread/8xch90zogywwpo5wnsf4o088mkxy4qtf +origin: https://github.com/apache/apr-util/commit/6ce807e0f12b666c72ffce1a0f21b4df03fa13ec +bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143837 +--- + dbd/apr_dbd_oracle.c | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c +index e2e2e7e..7fc0112 100644 +--- a/dbd/apr_dbd_oracle.c ++++ b/dbd/apr_dbd_oracle.c +@@ -848,7 +848,25 @@ static int dbd_oracle_query(apr_dbd_t *sql, int *nrows, const char *query) + static const char *dbd_oracle_escape(apr_pool_t *pool, const char *arg, + apr_dbd_t *sql) + { +- return arg; /* OCI has no concept of string escape */ ++ char *newstr, *src, *dst, *sq; ++ int qcount; ++ ++ /* return the original if there are no single-quotes */ ++ if (!(sq = strchr(s, '\''))) ++ return (char *)s; ++ /* count the single-quotes and allocate a new buffer */ ++ for (qcount = 1; (sq = strchr(sq + 1, '\'')); ) ++ qcount++; ++ newstr = apr_palloc(pool, strlen(s) + qcount + 1); ++ ++ /* move chars, doubling all single-quotes */ ++ src = (char *)s; ++ for (dst = newstr; *src; src++) { ++ if ((*dst++ = *src) == '\'') ++ *dst++ = '\''; ++ } ++ *dst = 0; ++ return newstr; + } + + static int dbd_oracle_prepare(apr_pool_t *pool, apr_dbd_t *sql, diff -Nru apr-util-1.6.3/debian/patches/CVE-2026-34501.patch apr-util-1.6.3/debian/patches/CVE-2026-34501.patch --- apr-util-1.6.3/debian/patches/CVE-2026-34501.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2026-34501.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,120 @@ +From: Eric Covener +Date: Mon, 3 Aug 2026 12:28:37 +0000 +Subject: Merge r1936809 from aprutil 1.7.x: + +Merge r1936808 from apr trunk: + +apr_redis error checking + +Submitted By: jfclere +Reviewed By: jfclere, jorton, covener + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936810 13f79535-47bb-0310-9956-ffa450edef68 +bug: https://lists.apache.org/thread/o8h6c7cq86fplxlnry6c3rn9x0ovq8mv +origin: https://github.com/apache/apr-util/commit/e8f36bd5f1cc1c82bed1ae52d5699a4c610251c2 +bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143837 +--- + redis/apr_redis.c | 54 +++++++++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 43 insertions(+), 11 deletions(-) + +diff --git a/redis/apr_redis.c b/redis/apr_redis.c +index 8d01fdd..e7fe207 100644 +--- a/redis/apr_redis.c ++++ b/redis/apr_redis.c +@@ -853,26 +853,42 @@ APU_DECLARE(apr_status_t) apr_redis_setex(apr_redis_t *rc, + return rv; + } + ++/* Redis upstream default is 512Mb. This code will try to read the entire ++ * response into a brigade, and then copy that into a pool, so impose ++ * some reasonable limit since RAM consumption will be double this. ++ * https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings ++ */ ++#ifndef APR_REDIS_MAX_BULK_LEN ++#define APR_REDIS_MAX_BULK_LEN (64 * 1024 * 1024) ++#endif ++ + static apr_status_t grab_bulk_resp(apr_redis_server_t *rs, apr_redis_t *rc, + apr_redis_conn_t *conn, apr_pool_t *p, + char **baton, apr_size_t *new_length) + { +- char *length; ++ /* conn->buffer contains "$\r\n" */ ++ char *length = conn->buffer + 1; + char *last; + apr_status_t rv; + apr_size_t len = 0; ++ long val; ++ + *new_length = 0; ++ *baton = NULL; + +- length = apr_strtok(conn->buffer + 1, " ", &last); +- if (length) { +- len = strtol(length, (char **) NULL, 10); ++ errno = 0; ++ last = NULL; ++ val = strtol(length, &last, 10); ++ if (errno || last == NULL || last == length || *last != '\r' ++ || val < 0 || val > APR_REDIS_MAX_BULK_LEN) { ++ rs_bad_conn(rs, conn); ++ if (rc) ++ apr_redis_disable_server(rc, rs); ++ return val > APR_REDIS_MAX_BULK_LEN ? APR_ENOSPC : APR_EGENERAL; + } ++ len = (apr_size_t)val; + +- if (len == 0) { +- *new_length = 0; +- *baton = NULL; +- } +- else { ++ if (len) { + apr_bucket_brigade *bbb; + apr_bucket *e; + +@@ -907,6 +923,11 @@ static apr_status_t grab_bulk_resp(apr_redis_server_t *rs, apr_redis_t *rc, + + conn->bb = bbb; + ++ if (len < 2) { ++ *baton = NULL; ++ *new_length = 0; ++ return APR_EGENERAL; ++ } + *new_length = len - 2; + (*baton)[*new_length] = '\0'; + } +@@ -992,6 +1013,10 @@ APU_DECLARE(apr_status_t) apr_redis_getp(apr_redis_t *rc, + } + else if (strncmp(RS_TYPE_STRING, conn->buffer, RS_TYPE_STRING_LEN) == 0) { + rv = grab_bulk_resp(rs, rc, conn, p, baton, new_length); ++ if (rv != APR_SUCCESS) { ++ /* grab_bulk_resp already called rs_bad_conn; do not also release */ ++ return rv; ++ } + } + else { + rv = APR_EGENERAL; +@@ -1172,12 +1197,19 @@ apr_redis_info(apr_redis_server_t *rs, apr_pool_t *p, char **baton) + return rv; + } + +- if (strncmp(RS_TYPE_STRING, conn->buffer, RS_TYPE_STRING_LEN) == 0) { ++ if (strncmp(RS_NOT_FOUND_GET, conn->buffer, RS_NOT_FOUND_GET_LEN) == 0) { ++ rv = APR_NOTFOUND; ++ } ++ else if (strncmp(RS_TYPE_STRING, conn->buffer, RS_TYPE_STRING_LEN) == 0) { + apr_size_t nl; + rv = grab_bulk_resp(rs, NULL, conn, p, baton, &nl); ++ if (rv != APR_SUCCESS) { ++ /* grab_bulk_resp already called rs_bad_conn; do not also release */ ++ return rv; ++ } + } else { + rs_bad_conn(rs, conn); +- rv = APR_EGENERAL; ++ return APR_EGENERAL; + } + + rs_release_conn(rs, conn); diff -Nru apr-util-1.6.3/debian/patches/CVE-2026-34502.patch apr-util-1.6.3/debian/patches/CVE-2026-34502.patch --- apr-util-1.6.3/debian/patches/CVE-2026-34502.patch 1970-01-01 00:00:00.000000000 +0000 +++ apr-util-1.6.3/debian/patches/CVE-2026-34502.patch 2026-08-09 16:26:22.000000000 +0000 @@ -0,0 +1,98 @@ +From: Eric Covener +Date: Mon, 3 Aug 2026 12:33:18 +0000 +Subject: Merge r1936812 from aprutil 1.7.x: + +Merge r1936811 from apr trunk: + +apr_memcache: error checking + +Reviewed By: covener, jorton, jfclere + +git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936813 13f79535-47bb-0310-9956-ffa450edef68 +origin: https://github.com/apache/apr-util/commit/f1c98dd0847c43375daf3789c936685adbc6d872 +bug: https://lists.apache.org/thread/spk5643m4vq0mb8h5b9hz9gkp57ombl8 +bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143837 +--- + memcache/apr_memcache.c | 31 ++++++++++++++++++++++++++++--- + 1 file changed, 28 insertions(+), 3 deletions(-) + +diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c +index ae41b2e..69e102d 100644 +--- a/memcache/apr_memcache.c ++++ b/memcache/apr_memcache.c +@@ -595,6 +595,11 @@ static apr_status_t get_server_line(apr_memcache_conn_t *conn) + conn->blen = bsize; + conn->buffer[bsize] = '\0'; + ++ /* Validate CRLF line termination to prevent integer underflow attacks */ ++ if (bsize < 2 || conn->buffer[bsize-2] != '\r' || conn->buffer[bsize-1] != '\n') { ++ return APR_EGENERAL; ++ } ++ + return apr_brigade_cleanup(conn->tb); + } + +@@ -1087,9 +1092,14 @@ apr_memcache_version(apr_memcache_server_t *ms, + } + + if (strncmp(MS_VERSION, conn->buffer, MS_VERSION_LEN) == 0) { +- *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1, +- conn->blen - MS_VERSION_LEN - 2); +- rv = APR_SUCCESS; ++ if (conn->blen < MS_VERSION_LEN + 2) { ++ rv = APR_EGENERAL; ++ } ++ else { ++ *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1, ++ conn->blen - MS_VERSION_LEN - 2); ++ rv = APR_SUCCESS; ++ } + } + else { + rv = APR_EGENERAL; +@@ -1555,23 +1565,35 @@ apr_memcache_multgetp(apr_memcache_t *mc, + static const char *stat_read_string(apr_pool_t *p, char *buf, apr_size_t len) + { + /* remove trailing \r\n and null char */ ++ if (len < 2) { ++ return apr_pstrdup(p, ""); ++ } + return apr_pstrmemdup(p, buf, len-2); + } + + static apr_uint32_t stat_read_uint32(apr_pool_t *p, char *buf, apr_size_t len) + { ++ if (len < 2) { ++ return 0; ++ } + buf[len-2] = '\0'; + return atoi(buf); + } + + static apr_uint64_t stat_read_uint64(apr_pool_t *p, char *buf, apr_size_t len) + { ++ if (len < 2) { ++ return 0; ++ } + buf[len-2] = '\0'; + return apr_atoi64(buf); + } + + static apr_time_t stat_read_time(apr_pool_t *p, char *buf, apr_size_t len) + { ++ if (len < 2) { ++ return 0; ++ } + buf[len-2] = '\0'; + return apr_time_from_sec(atoi(buf)); + } +@@ -1583,6 +1605,9 @@ static apr_time_t stat_read_rtime(apr_pool_t *p, char *buf, apr_size_t len) + char *usecs; + const char *sep = ":."; + ++ if (len < 2) { ++ return apr_time_make(0, 0); ++ } + buf[len-2] = '\0'; + + secs = apr_strtok(buf, sep, &tok); diff -Nru apr-util-1.6.3/debian/patches/series apr-util-1.6.3/debian/patches/series --- apr-util-1.6.3/debian/patches/series 2024-08-04 09:57:04.000000000 +0000 +++ apr-util-1.6.3/debian/patches/series 2026-08-09 16:26:22.000000000 +0000 @@ -10,3 +10,9 @@ fix_doxygen_inputdir doxygen_no_ful_path_names.patch fix_db53_detechtion.patch +CVE-2025-49506.patch +CVE-2026-32327_pre1.patch +CVE-2026-32327.patch +CVE-2026-34191.patch +CVE-2026-34501.patch +CVE-2026-34502.patch