Skip to contentSkip to conversation

squid: upgrade 6.10 -> 6.12

PATCH New Peter Marko 1 participant 2 messages Nov 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 squid: upgrade 6.10 -> 6.12

From: Peter Marko <[email protected]>

License-Update: copyright year updated

Add patch to fix new build failure from release tarball.

---
 ...e-reference-to-nonexisting-directory.patch | 55 +++++++++++++++++++
 .../squid/{squid_6.10.bb => squid_6.12.bb}    |  5 +-
 2 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-daemons/squid/files/0001-libltdl-remove-reference-to-nonexisting-directory.patch
 rename meta-networking/recipes-daemons/squid/{squid_6.10.bb => squid_6.12.bb} (95%)
meta-networking/recipes-daemons/squid/files/0001-libltdl-remove-reference-to-nonexisting-directory.patch new file +55 -0
new file mode 100644
index 0000000000..9babcfb24d
@@ -0,0 +1,55 @@
+From a6638a007a42917fea4b03e5c30d9b7208c634c4 Mon Sep 17 00:00:00 2001
+From: Peter Marko <[email protected]>
+Date: Thu, 7 Nov 2024 22:04:40 +0100
+Subject: [PATCH] libltdl: remove reference to nonexisting directory
+
+Commit [1] removed directory libltdl/m4 from release tarball by merging
+all those files into libltdl/aclocal.m4, however makefiles still
+reference it causing following error in do_configure:
+
+| autoreconf: Entering directory 'libltdl'
+| autoreconf: configure.ac: not using Gettext
+| autoreconf: running: aclocal --system-acdir=WORKDIR/recipe-sysroot/usr/share/aclocal/ -I WORKDIR/squid-6.12/acinclude/ -I WORKDIR/recipe-sysroot-native/usr/share/aclocal/ --force -I m4
+| aclocal: error: couldn't open directory 'm4': No such file or directory
+| autoreconf: error: aclocal failed with exit status: 1
+
+Remove these invalid references.
+
+[1] https://github.com/squid-cache/squid/commit/b4addc2262e5bee37543f8d1ab9dd98337bafba3
+
+Signed-off-by: Peter Marko <[email protected]>
+Upstream-Status: Inappropriate [upstream ticket https://lists.squid-cache.org/pipermail/squid-users/2024-November/027244.html]
+---
+ libltdl/Makefile.am | 2 +-
+ libltdl/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am
+index aad98e2..8a9539b 100644
+--- a/libltdl/Makefile.am
++++ b/libltdl/Makefile.am
+@@ -29,7 +29,7 @@
+ ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #####
+ 
+-ACLOCAL_AMFLAGS = -I m4
++ACLOCAL_AMFLAGS =
+ AUTOMAKE_OPTIONS = foreign
+ AM_CPPFLAGS =
+ AM_LDFLAGS =
+diff --git a/libltdl/Makefile.in b/libltdl/Makefile.in
+index 9929557..c77df2e 100644
+--- a/libltdl/Makefile.in
++++ b/libltdl/Makefile.in
+@@ -448,7 +448,7 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-ACLOCAL_AMFLAGS = -I m4
++ACLOCAL_AMFLAGS =
+ AUTOMAKE_OPTIONS = foreign
+ 
+ # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
+-- 
+2.30.2
+
meta-networking/recipes-daemons/squid/squid_6.12.bb renamed from meta-networking/recipes-daemons/squid/squid_6.10.bb +3 -2
similarity index 95%
rename from meta-networking/recipes-daemons/squid/squid_6.10.bb
rename to meta-networking/recipes-daemons/squid/squid_6.12.bb
index 984209ad21..cc3d2f25db 100644
@@ -19,13 +19,14 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \
            file://run-ptest \
            file://volatiles.03_squid \
            file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \
+           file://0001-libltdl-remove-reference-to-nonexisting-directory.patch \
            file://squid.nm \
            "
 
-SRC_URI[sha256sum] = "0b07b187e723f04770dd25beb89aec12030a158696aa8892d87c8b26853408a7"
+SRC_URI[sha256sum] = "f3df3abb2603a513266f24a5d4699a9f0d76b9f554d1848b67f9c51cd3b3cb50"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \
+                    file://errors/COPYRIGHT;md5=6fbb6a2adc362e206da7b4f42846cdec \
                     "
 DEPENDS = "libtool"
 
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 squid: handle CVE-2024-45802

From: Peter Marko <[email protected]>

According to [1] the ESI implementation in squid feature is vulnerable without any fix available.

NVD says it's fixed in 6.10, however the change in this release only disables ESI by default (which we always did via PACKAGECONFIG). This means CVE report would say Patched even if the vulnerability is still present if someone adapts squid PACKAGECONFIG.

Commit in master branch related to this CVE is [2].
Title is "Remove Edge Side Include (ESI) protocol" and it's also what it does. So there will never be a fix for these ESI vulnerabilities. Based on this, remove vulnerable ESI PACKAGECONFIG already now.

[1] https://github.com/squid-cache/squid/security/advisories/GHSA-f975-v7qw-q7hj
[2] https://github.com/squid-cache/squid/commit/5eb89ef3d828caa5fc43cd8064f958010dbc8158

---
 meta-networking/recipes-daemons/squid/squid_6.12.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-networking/recipes-daemons/squid/squid_6.12.bb +3 -2
index cc3d2f25db..a697f21836 100644
@@ -48,7 +48,6 @@ PACKAGECONFIG ??= "auth url-rewrite-helpers \
 PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
 PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking,"
-PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2"
 PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl"
 PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl"
 PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers,"
@@ -67,7 +66,9 @@ BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}"
 EXTRA_OECONF += "--with-default-user=squid \
                  --sysconfdir=${sysconfdir}/${BPN} \
                  --with-logdir=${localstatedir}/log/${BPN} \
-                 'PERL=${USRBINPATH}/env perl'"
+                 'PERL=${USRBINPATH}/env perl' \
+                 --disable-esi \
+"
 
 # Workaround a build failure when using a native compiler that need -std=c++17
 # with a cross-compiler that doesn't.
Signature · 1 line
2.30.2