From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ctK2n5FQCz331Q for ; Fri, 24 Oct 2025 10:32:01 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ctK2k2g1vz2xQd for ; Fri, 24 Oct 2025 10:31:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ctK2C41FLz3qx; Fri, 24 Oct 2025 10:31:31 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1761301891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6QFSx5VMnhxfDDeHbczR/93IzzPMntHMFiAWbRr1HfQ=; b=o+mBneuVQ/HMBcVrRzj7UTpnPav5rpcnQLby1DrsJaEFSmwbjpa8SxQRoRNS6rpyj+vOQF 0jpYPlqxDR+JzGBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1761301891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6QFSx5VMnhxfDDeHbczR/93IzzPMntHMFiAWbRr1HfQ=; b=rxRFs1Gn90nMOEvQYD8xWOewBS402gdjjS3n1JUGQQ7uxbwxiJg5fJHkD/lZqceIf1Gy1o cXLbdTrfBTkhaMHSzFL5nJEoAQxZtTZvANj5HcHD5X1oGPbaRn2cI+05tUNQ9wx4HVTLW8 OtoQtpFZJl7qoOyrXSoSyIyei2U6SuzFbo8joKI+/K1+jTy9+QB8k0bVbq1NNgI1FsRJXj yr6aPxcSIS6/RLmZnMpnSuWRuTNf5NrruOViBbh2Rk2HchI5euuD4/1HKR9CahJH7SWorL Og65Ijcuhzf+LupW2pN9swcYQexN2psDHgwplNV84Sx2TsNYgdXMjCZQ/wBESQ== Content-Type: text/plain; charset=utf-8 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Re: [PATCH] proxy.cgi: Mitigation for CVE-2025-62168 on squid From: Michael Tremer In-Reply-To: Date: Fri, 24 Oct 2025 11:31:31 +0100 Cc: development@lists.ipfire.org Content-Transfer-Encoding: quoted-printable Message-Id: <31474DDE-16E9-41C5-ACE1-F7E23922638C@ipfire.org> References: <20251020104829.2151809-1-adolf.belka@ipfire.org> <0bfb7746-bd76-487c-a489-b6e66a0d24f6@ipfire.org> <1AEDBC18-8794-438F-9475-5650A43152C3@ipfire.org> To: Matthias Fischer Hello, > On 22 Oct 2025, at 14:28, Matthias Fischer = wrote: >=20 > On 22.10.2025 12:10, Michael Tremer wrote: >> Hello Matthias, >=20 > Hi Michael, >> Thanks for looking into this. It seems that we have a bit of work on = our hands, but doesn=E2=80=99t sound too bad after all. >=20 > As far as I can see by now, adjusting the UI could be sufficient. = IMHO. > Since my last post, v7.2 is running without any problems or logged > errors. I even activated 'privoxy' for testing - which the old 'squid' > didn't really like - and got no problems. > See further comments below. Oh wow, a trip down memory lane... >>> On 20 Oct 2025, at 20:44, Matthias Fischer = wrote: >>>=20 >>> Hi, >>>=20 >>> On 20.10.2025 12:48, Adolf Belka wrote: >>>> - The full fix for CVE-2025-62168 is in version squid-7.2 >>>> - However there are a lot of changes in squid from version 6 to 7 = with all the error >>>> language files no longer provided directly, they have to be = obtained from separate >>>> langauage packs now. Also several tools like cachmgr.cgi have been = removed as the >>>> options can be obtained via different approaches. >>>> - I have had a look at squid-7.2 and I believe I can do the upgrade = but it will take some >>>> time to be sure it is working properly. >>>> - In the interim, this patch adds the mitigation "email_err_data = off" into squid.conf >>>> that is referenced in the CVE report. >>>> - If someone else has already worked on squid-7.2 and has it ready = to go now or soon, >>>> then this patch can be dropped. >>>=20 >>> Yes, I did it - and I'm testing it with Core 197: >>>=20 >>> ... >>> 2025/10/20 19:52:50 kid1| Processing Configuration File: >>> /etc/squid/squid.conf (depth 0) >>> 2025/10/20 19:52:50 kid1| Current Directory is / >>> 2025/10/20 19:52:50 kid1| Starting Squid Cache version 7.2 for >>> x86_64-pc-linux-gnu... >>> ... >>>=20 >>> But I don't really trust the new 'squid' yet. Building was simple - = I >>> only changed version and checksum in the existing lfs-file, that's = all >>> it needed. And a few changes in the rootfile - as Adolf wrote, = several >>> tools have been removed. By the way: in the current v7.2, the "error >>> language files" are included, no need to download them seperately! = So >>> upgrading was easy, but... ;-) >>>=20 >>> Right now, its running without seen problems. What bothers me, is = that >>> the 'proxy.cgi' needs to be adjusted. This seems to be a bit tricky = and >>> I won't have the time for this in the near future. Even if my = original >>> 'squid.conf' works fine I don't know what happens if someone needs = the >>> removed "basic_smb_lm_auth and ntlm_smb_lm_auth helpers" (e.g. from >>> changelog) and clicks on "Save and restart"... >>>=20 >>> Other changes (v7.0.1): >>> - Remove Edge Side Include (ESI) protocol >>> - Remove Ident protocol support >>> - Remove cache_object protocol support >>> - Remove cachemgr.cgi tool >>> - Remove tool 'purge' for management of UFS/AUFS/DiskD caches >>> - Remove squidclient >>> And the list goes on... >>=20 >> Let=E2=80=99s go through this one by one... >>=20 >> - Remove Edge Side Include (ESI) protocol >>=20 >> We don=E2=80=99t use this as far as I can see. >>=20 >> - Remove Ident protocol support >>=20 >> We have the option, but hopefully nobody is using this any more. We = will have to remove it from the UI, mention it in the changelog and = done. >=20 > This is something I'm not so familiar with: how do we remove "ident > protocol support" from 'proxy.cgi'!? This CGI is...huge...to say the > least. ;-) >=20 > At a quick glance I find 137 lines of code containing "ident". >=20 > E.g., I find "my $identdir =3D", "my $identhosts =3D", various > $proxysettings. Can all these entries and lines be deleted? >=20 > For example, what has to be done with code blocks as starting at line = 438: >=20 > ... > if (!($proxysettings{'AUTH_METHOD'} eq 'none')) > { > unless (($proxysettings{'AUTH_METHOD'} eq 'ident') && > ... >=20 > and 1704: > ... > if (!($proxysettings{'AUTH_METHOD'} eq 'none')) { if > (!($proxysettings{'AUTH_METHOD'} eq 'ident')) { print < ... >=20 > There a rather long code blocks following these conditions and I'm not > sure which can be deleted and which must stay.> No problem. Would Adolf like to have a look or pass it straight to me? >> - Remove cache_object protocol support >>=20 >> We should not be using this. >>=20 >> - Remove cachemgr.cgi tool >>=20 >> This is installed and linked on the web UI. We will have to remove = this too. >=20 > This could be easier... >> - Remove tool 'purge' for management of UFS/AUFS/DiskD caches >>=20 >> This is installed, but we don=E2=80=99t call it. >=20 > Same as above. >=20 >> - Remove squidclient >>=20 >> Installed, but also not used. >>=20 >> - Remove disabled classful networks code >>=20 >> I don=E2=80=99t know what this could possibly mean. I don=E2=80=99t = think it is referring to parsing the ACLs, but if it does, we found find = out about it very quickly. >>=20 >> - Remove dead Multicast Miss Stream feature >> - Remove broken and disabled icpPktDump() >> - Remove deprecated string memory pools API >>=20 >> Since these are all dead and broken, we should not worry about them = at all. >>=20 >>> A change in v7.2 ("Bug 5504: Document that Squid discards invalid >>> rewrite-url") made an acl necessary (url_rewrite_access deny = CONNECT) >>> because 'squid.conf' was suddenly flooded with errors: "URL-rewrite >>> produces invalid request: CONNECT >>> http://[ROUTER_IP_DELETED]:81/images/urlfilter/1x1.gif HTTP/1.1 = current >>> master transaction: master53" >>> And the v7.1 didn't ran at all, because of similar problems with the >>> urlfilter. Hm... >>=20 >> That is not good. But testing will tell us more about where this is = going wrong. >>=20 >>> So I would recommend that we adjust the 'proxy'cgi' accordingly and = test >>> very carefully, before we upgrade 'squid' to 7.2. I'll test and = report... >>=20 >> Would you like to create a branch and submit the changes one by one? >=20 > I can try - but it will take a while. We will go on vacation for the > next two weeks and since my wife is unfortunately seriously ill, I = don't > have as much time for projects like this as I used to. When were back, > I'll take a look and if in doubt, I will ask. Happy holidays and sorry to hear about your wife. I would say it probably is best to use your time to help us test. You = are very familiar with squid and running it in production, so applying = any changes to your system and testing them there would be a good start. > By the way - wouldn't it also make sense to remove the still contained > 'clamav'-entries? Yes, there would be a lot of stuff to be cleaned up in proxy.cgi, but = who has the time for this? Best, -Michael > I'll see what I can do. ;-) >=20 > Best > Matthias >> -Michael >>=20 >>>=20 >>> Jm2c - Regards >>> Matthias >>>> Signed-off-by: Adolf Belka >>>> --- >>>> html/cgi-bin/proxy.cgi | 1 + >>>> 1 file changed, 1 insertion(+) >>>>=20 >>>> diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi >>>> index fdb7c6a77..f0547e249 100644 >>>> --- a/html/cgi-bin/proxy.cgi >>>> +++ b/html/cgi-bin/proxy.cgi >>>> @@ -3109,6 +3109,7 @@ sub writeconfig >>>> shutdown_lifetime 5 seconds >>>> icp_port 0 >>>> httpd_suppress_version_string on >>>> +email_err_data off >>>>=20 >>>> END >>>> ;