Skip to contentSkip to conversation

squid: download from github

PATCH New Peter Marko 1 participant 3 messages Oct 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 squid: download from github

From: Peter Marko <[email protected]>

Devtool could not find latest versions before.

Download page [1] shows message
"Squid sources are released through GitHub. Please refer to the Releases Page to find all released versions."

Note that also squid security advisories were moved to Github.

[1] https://www.squid-cache.org/Versions/

---
 meta-networking/recipes-daemons/squid/squid_6.12.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta-networking/recipes-daemons/squid/squid_6.12.bb +6 -3
index 87144fb049..41226f232e 100644
@@ -9,10 +9,9 @@ HOMEPAGE = "http://www.squid-cache.org"
 SECTION = "web"
 LICENSE = "GPL-2.0-or-later"
 
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
-MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+PV_U = "${@d.getVar('PV').replace('.', '_')}"
 
-SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \
+SRC_URI = "https://github.com/squid-cache/${BPN}/releases/download/SQUID_${PV_U}/${BPN}-${PV}.tar.xz \
            file://Set-up-for-cross-compilation.patch \
            file://Skip-AC_RUN_IFELSE-tests.patch \
            file://squid-use-serial-tests-config-needed-by-ptest.patch \
@@ -28,6 +27,10 @@ SRC_URI[sha256sum] = "f3df3abb2603a513266f24a5d4699a9f0d76b9f554d1848b67f9c51cd3
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://errors/COPYRIGHT;md5=6fbb6a2adc362e206da7b4f42846cdec \
                     "
+
+UPSTREAM_CHECK_URI = "https://github.com/squid-cache/${BPN}/releases/"
+UPSTREAM_CHECK_REGEX = "v?(?P<pver>\d+(\.\d+)+)"
+
 DEPENDS = "libtool"
 
 inherit autotools pkgconfig useradd ptest perlnative systemd
#1 lore raw

PATCH 2/3 squid: upgrade 6.12 -> 7.1

From: Peter Marko <[email protected]>

Refresh all patches.
ptest patches needed larger rework for new test testHeader.

License-Update: copyright years refreshed

---
 ...quid-conf-tests-run-on-target-device.patch | 82 ++++++++++++++++---
 .../files/Set-up-for-cross-compilation.patch  |  6 +-
 .../files/Skip-AC_RUN_IFELSE-tests.patch      |  8 +-
 ...-serial-tests-config-needed-by-ptest.patch |  2 +
 .../squid/{squid_6.12.bb => squid_7.1.bb}     |  4 +-
 5 files changed, 84 insertions(+), 18 deletions(-)
 rename meta-networking/recipes-daemons/squid/{squid_6.12.bb => squid_7.1.bb} (97%)
meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch +70 -12
index ca1c16b83e..86b454d710 100644
@@ -7,20 +7,46 @@ Subject: [PATCH] squid: make squid-conf-tests run on target device
 * Allow the tests to run on read-only root
   * Don't overwrite tests with true on success
   * Change logfile path to /var/log
+* skip testHeaders since it's not split to prepare/execute parts
 
 Upstream-Status: Inappropriate [cross compile specific]
 
 Signed-off-by: Patrick Wicki <[email protected]>
-
+Signed-off-by: Peter Marko <[email protected]>
 ---
- test-suite/Makefile.am        | 16 ++++++++--------
- test-suite/test-squid-conf.sh |  2 +-
- 2 files changed, 9 insertions(+), 9 deletions(-)
+ src/TestHeaders.am            |  6 +++---
+ test-suite/Makefile.am        | 26 +++++++++++++-------------
+ test-suite/test-squid-conf.sh |  4 ++--
+ 3 files changed, 18 insertions(+), 18 deletions(-)
 
+diff --git a/src/TestHeaders.am b/src/TestHeaders.am
+index 0ed5f56..d668876 100644
+--- a/src/TestHeaders.am
++++ b/src/TestHeaders.am
+@@ -14,8 +14,8 @@ EXCLUDE_FROM_HDR_TESTING =
+ # add an empty target named 'testHeaders' depending on the additional
+ # headers to test
+ 
+-testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite/testHeader.cc.in
+-	$(MAKE) $(^:.h=.hdrtest) && cp $(TRUE) $@
++testHeaders: $(SOURCES) $(noinst_HEADERS) $(top_srcdir)/test-suite/testHeader.cc.in
++	$(MAKE) $(^:.h=.hdrtest)
+ 
+ .h.hdrtest:
+ 	@SrcFilePath=`echo $< | $(SED) 's%^$(top_srcdir)/%%'`; \
+@@ -31,5 +31,5 @@ testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite
+ 		then echo "header-test: ok - $$SrcFilePath"; $(RM) "$$TargetFileName.cc" "$$TargetFileName"; \
+ 		else echo "header-test: not ok - $$SrcFilePath"; exit 1; fi
+ 
+-TESTS += testHeaders
++#TESTS += testHeaders
+ CLEANFILES += testHeaders
+diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
+index 0da5844..0bc381a 100644
 --- a/test-suite/Makefile.am
 +++ b/test-suite/Makefile.am
-@@ -21,7 +21,7 @@ LDADD = \
- EXTRA_PROGRAMS = mem_node_test splay
+@@ -11,7 +11,7 @@ include $(top_srcdir)/src/Common.am
+ AM_CPPFLAGS += -I$(srcdir)
  
  EXTRA_DIST = \
 -	$(srcdir)/squidconf/* \
@@ -28,14 +54,27 @@ Signed-off-by: Patrick Wicki <[email protected]>
  	test-functionality.sh \
  	test-sources.sh \
  	test-squid-conf.sh \
-@@ -134,21 +134,21 @@ VirtualDeleteOperator_SOURCES = \
+@@ -124,37 +124,37 @@ VirtualDeleteOperator_LDADD = \
  
  installcheck-local: squid-conf-tests
  
 -squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
--	@failed=0; cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; rm -f $@ || $(TRUE); \
+-	@instructionFiles="$(srcdir)/squidconf/*.conf.instructions"; \
 +squid-conf-tests: test-squid-conf.sh $(top_builddir)/src/squid.conf.default squidconf/*
-+	@failed=0; cfglist="$(top_builddir)/src/squid.conf.default squidconf/*.conf"; rm -f $@ || $(TRUE); \
++	@instructionFiles="squidconf/*.conf.instructions"; \
+ 	for instructionFile in $$instructionFiles; do \
+ 		cfgBasename=`basename $$instructionFile .instructions`; \
+-		cfg=$(srcdir)/squidconf/$$cfgBasename; \
++		cfg=squidconf/$$cfgBasename; \
+ 		if ! test -f $$cfg; then \
+ 			echo "FAIL: $$instructionFile has no matching $$cfg"; \
+ 			exit 1; \
+ 		fi; \
+ 	done; \
+ 	failed=0; \
+-	cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; \
++	cfglist="$(top_builddir)/src/squid.conf.default squidconf/*.conf"; \
+ 	rm -f $@ || $(TRUE); \
  	for cfg in $$cfglist ; do \
 -		$(srcdir)/test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \
 +		./test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \
@@ -55,11 +94,30 @@ Signed-off-by: Patrick Wicki <[email protected]>
 -	if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi
 +	exit "$$failed"
  
--CLEANFILES += squid-conf-tests squid-stderr.log
-+CLEANFILES += squid-conf-tests /var/log/squid-stderr.log
+ CLEANFILES += \
+ 	squid-conf-tests \
+-	squid-expected-messages \
+-	squid-stderr.log \
+-	squid-stderr.log.next \
+-	squid-stderr.log.unmatched
++	/var/log/quid-expected-messages \
++	/var/log/squid-stderr.log \
++	/var/log/squid-stderr.log.next \
++	/var/log/squid-stderr.log.unmatched
+diff --git a/test-suite/test-squid-conf.sh b/test-suite/test-squid-conf.sh
+index 413a927..f678c5a 100755
 --- a/test-suite/test-squid-conf.sh
 +++ b/test-suite/test-squid-conf.sh
-@@ -111,7 +111,7 @@ then
+@@ -76,7 +76,7 @@ expectMessages()
+         exit 1
+     fi
+ 
+-    messageRegexFilename="squid-expected-messages"
++    messageRegexFilename="/var/log/squid-expected-messages"
+     if ! :> $messageRegexFilename
+     then
+         echo "$where: ERROR: Cannot create a temporary file named $messageRegexFilename"
+@@ -241,7 +241,7 @@ then
      done < $instructionsFile
  fi
  
meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch +4 -2
index 18bc78e6be..f80d37de20 100644
@@ -16,11 +16,13 @@ Upstream-Status: Pending
  configure.ac | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/configure.ac b/configure.ac
+index c7312d8..3b0e9e2 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -29,6 +29,7 @@ m4_include([acinclude/tdb.m4])
- m4_include([acinclude/lib-checks.m4])
+@@ -29,6 +29,7 @@ m4_include([acinclude/lib-checks.m4])
  m4_include([acinclude/ax_cxx_compile_stdcxx.m4])
+ m4_include([acinclude/win32-sspi.m4])
  
 +HOSTCXX="$BUILD_CXX"
  PRESET_CFLAGS="$CFLAGS"
meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +6 -2
index 489850e3bd..8522a299c1 100644
@@ -16,10 +16,12 @@ Signed-off-by: Jackie Huang <[email protected]>
  acinclude/lib-checks.m4 |  8 ++++++--
  2 files changed, 15 insertions(+), 3 deletions(-)
 
+diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4
+index e0286fa..b3e4bc7 100644
 --- a/acinclude/krb5.m4
 +++ b/acinclude/krb5.m4
-@@ -57,7 +57,15 @@ main(void)
- 
+@@ -98,7 +98,15 @@ main(void)
+         krb5_init_context(&context);
          return 0;
  }
 -]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ])
@@ -35,6 +37,8 @@ Signed-off-by: Jackie Huang <[email protected]>
      ])
      SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test)
    ])
+diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4
+index 9793b9a..4f2dc83 100644
 --- a/acinclude/lib-checks.m4
 +++ b/acinclude/lib-checks.m4
 @@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[
meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch +2 -0
index 5df006038b..d57ebe7869 100644
@@ -14,6 +14,8 @@ Signed-off-by: Jackie Huang <[email protected]>
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/configure.ac b/configure.ac
+index 3b0e9e2..c730212 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -10,7 +10,7 @@ AC_PREREQ(2.61)
meta-networking/recipes-daemons/squid/squid_7.1.bb renamed from meta-networking/recipes-daemons/squid/squid_6.12.bb +2 -2
similarity index 97%
rename from meta-networking/recipes-daemons/squid/squid_6.12.bb
rename to meta-networking/recipes-daemons/squid/squid_7.1.bb
index 41226f232e..d17223e866 100644
@@ -22,10 +22,10 @@ SRC_URI = "https://github.com/squid-cache/${BPN}/releases/download/SQUID_${PV_U}
            file://squid.nm \
            "
 
-SRC_URI[sha256sum] = "f3df3abb2603a513266f24a5d4699a9f0d76b9f554d1848b67f9c51cd3b3cb50"
+SRC_URI[sha256sum] = "763b5a78561cedc4e47634fa42b8e6b8d46c87c949a151b4e7ac2396d2f97dea"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://errors/COPYRIGHT;md5=6fbb6a2adc362e206da7b4f42846cdec \
+                    file://errors/COPYRIGHT;md5=c2a0e15750d3a9743af9109fecc05622 \
                     "
 
 UPSTREAM_CHECK_URI = "https://github.com/squid-cache/${BPN}/releases/"
#2 lore raw

PATCH 3/3 squid: patch CVE-2025-59362

In reply to Peter Marko

From: Peter Marko <[email protected]>

Pick patch from PR ]1] mentioned in NVD report [2].

[1] https://github.com/squid-cache/squid/pull/2149
[2] https://nvd.nist.gov/vuln/detail/CVE-2025-59362

---
 .../squid/files/CVE-2025-59362.patch          | 52 +++++++++++++++++++
 .../recipes-daemons/squid/squid_7.1.bb        |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/squid/files/CVE-2025-59362.patch
meta-networking/recipes-daemons/squid/files/CVE-2025-59362.patch new file +52 -0
new file mode 100644
index 0000000000..26a3896625
@@ -0,0 +1,52 @@
+From 0d89165ee6da10e6fa50c44998b3cd16d59400e9 Mon Sep 17 00:00:00 2001
+From: Alex Rousskov <[email protected]>
+Date: Sat, 30 Aug 2025 06:49:36 +0000
+Subject: [PATCH] Fix ASN.1 encoding of long SNMP OIDs (#2149)
+
+CVE: CVE-2025-59362
+Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/0d89165ee6da10e6fa50c44998b3cd16d59400e9]
+Signed-off-by: Peter Marko <[email protected]>
+---
+ lib/snmplib/asn1.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/lib/snmplib/asn1.c b/lib/snmplib/asn1.c
+index 81f2051fb..2852c26b2 100644
+--- a/lib/snmplib/asn1.c
++++ b/lib/snmplib/asn1.c
+@@ -735,6 +735,7 @@ asn_build_objid(u_char * data, int *datalength,
+      * lastbyte ::= 0 7bitvalue
+      */
+     u_char buf[MAX_OID_LEN];
++    u_char *bufEnd = buf + sizeof(buf);
+     u_char *bp = buf;
+     oid *op = objid;
+     int asnlength;
+@@ -753,6 +754,10 @@ asn_build_objid(u_char * data, int *datalength,
+     while (objidlength-- > 0) {
+         subid = *op++;
+         if (subid < 127) {  /* off by one? */
++            if (bp >= bufEnd) {
++                snmp_set_api_error(SNMPERR_ASN_ENCODE);
++                return (NULL);
++            }
+             *bp++ = subid;
+         } else {
+             mask = 0x7F;    /* handle subid == 0 case */
+@@ -770,8 +775,16 @@ asn_build_objid(u_char * data, int *datalength,
+                 /* fix a mask that got truncated above */
+                 if (mask == 0x1E00000)
+                     mask = 0xFE00000;
++                if (bp >= bufEnd) {
++                    snmp_set_api_error(SNMPERR_ASN_ENCODE);
++                    return (NULL);
++                }
+                 *bp++ = (u_char) (((subid & mask) >> bits) | ASN_BIT8);
+             }
++            if (bp >= bufEnd) {
++                snmp_set_api_error(SNMPERR_ASN_ENCODE);
++                return (NULL);
++            }
+             *bp++ = (u_char) (subid & mask);
+         }
+     }
meta-networking/recipes-daemons/squid/squid_7.1.bb +1 -0
index d17223e866..bba26cc5fa 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://github.com/squid-cache/${BPN}/releases/download/SQUID_${PV_U}
            file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \
            file://0001-libltdl-remove-reference-to-nonexisting-directory.patch \
            file://squid.nm \
+           file://CVE-2025-59362.patch \
            "
 
 SRC_URI[sha256sum] = "763b5a78561cedc4e47634fa42b8e6b8d46c87c949a151b4e7ac2396d2f97dea"