From e37329828e58a274b01ef4276d96607bf190f8a3 Mon Sep 17 00:00:00 2001 From: Eduard Bagdasaryan Date: Fri, 16 Jun 2023 15:10:59 +0000 Subject: [PATCH] Forget non-peer access details (#1378) We were using the CachePeer class to record the address of each non-peer sending us certain unwanted ICP responses, along with the number of such responses and a histogram of associated ICP opcodes. Since 1997 commit e102ebd, these historical records were accumulated without a limit and linearly searched, endangering a Squid instance that used ICP. Using CachePeer to store this non-cache_peer information also complicated cache_peer code. This change removes these records and the corresponding mgr:non_peers report, leaving just the cache.log warning about unexpected messages. The warning is useful because these ICP messages from non-peers indicate a cache hierarchy misconfiguration or a fairly sophisticated attack. This is the simplest fix that minimizes Squid and developer resources spent on handling these errors. --- doc/release-notes/release-7.sgml.in | 20 +++++++++++-- src/CachePeer.h | 6 ++-- src/cf.data.pre | 1 - src/neighbors.cc | 46 ++++------------------------- 4 files changed, 25 insertions(+), 48 deletions(-) diff --git a/doc/release-notes/release-7.sgml.in b/doc/release-notes/release-7.sgml.in index 086e6350d8..dffca86487 100644 --- a/doc/release-notes/release-7.sgml.in +++ b/doc/release-notes/release-7.sgml.in @@ -30,11 +30,23 @@ The Squid-@SQUID_RELEASE@ change history can be +

For more information about the Cache Manager feature, see . + +

+ + non_peers +

Removed the mgr:non_peers report. Squid still ignores + unexpected ICP responses but no longer remembers the details that comprised + the removed report. The senders of these ICP messages are still reported to + cache.log at debugging level 1 (with an exponential backoff). + + Changes to squid.conf since Squid-@SQUID_RELEASE_OLD@

@@ -60,6 +72,10 @@ This section gives an account of those changes in three categories: buffered_logs

Honor the off setting in 'udp' access_log module. + cachemgr_passwd +

Removed the non_peers action. See the Cache Manager + for details. + Removed directives