]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
7 years agoBug 4169: HIT marked as MISS when If-None-Match does not match v3.2
Garri Djavadyan [Sat, 17 Dec 2016 12:59:41 +0000 (01:59 +1300)] 
Bug 4169: HIT marked as MISS when If-None-Match does not match

7 years agoBug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure
Garri Djavadyan [Sat, 17 Dec 2016 10:24:02 +0000 (23:24 +1300)] 
Bug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure

7 years agoBug 3290: authenticate_ttl not working for digest authentication
Garri Djavadyan [Sat, 17 Dec 2016 10:03:37 +0000 (23:03 +1300)] 
Bug 3290: authenticate_ttl not working for digest authentication

8 years agoBug 4515: regression after CVE-2016-4554 patch
Amos Jeffries [Sun, 8 May 2016 12:43:33 +0000 (00:43 +1200)] 
Bug 4515: regression after CVE-2016-4554 patch

8 years agoBug 4455: SegFault from ESIInclude::Start
Amos Jeffries [Fri, 6 May 2016 09:14:45 +0000 (21:14 +1200)] 
Bug 4455: SegFault from ESIInclude::Start

8 years agoRequire exact match in Host header name lookup
Amos Jeffries [Mon, 2 May 2016 03:44:32 +0000 (15:44 +1200)] 
Require exact match in Host header name lookup

8 years agoFix several ESI element construction issues
Amos Jeffries [Wed, 20 Apr 2016 11:17:31 +0000 (23:17 +1200)] 
Fix several ESI element construction issues

* Do not wrap active logic in assert().

* Fix localbuf array bounds checking.

* Add Must() conditions to verify array writes will succeed

8 years agocachemgr.cgi: use dynamic MemBuf for internal content generation
Amos Jeffries [Wed, 20 Apr 2016 10:11:48 +0000 (22:11 +1200)] 
cachemgr.cgi: use dynamic MemBuf for internal content generation

Using a fixed size buffer limits how big content lines can be. Modern
HTTP is fast reaching the point where such limits are problematic.
Also fixes incorrect uses of snprintf() by removing them.

8 years agopinger: Fix buffer overflow in Icmp6::Recv
Yuriy M. Kaminskiy [Wed, 30 Mar 2016 14:23:53 +0000 (03:23 +1300)] 
pinger: Fix buffer overflow in Icmp6::Recv

8 years agoBug 3696: crash when client delay pools are activated
Amos Jeffries [Fri, 28 Aug 2015 13:26:26 +0000 (06:26 -0700)] 
Bug 3696: crash when client delay pools are activated

9 years ago3.2.14 SQUID_3_2_14
Amos Jeffries [Fri, 1 May 2015 07:50:44 +0000 (00:50 -0700)] 
3.2.14

9 years agoFix X509 server certificate domain matching
Amos Jeffries [Fri, 1 May 2015 07:25:27 +0000 (00:25 -0700)] 
Fix X509 server certificate domain matching

The X509 certificate domain fields may contain non-ASCII encodings.
Ensure the domain match algorithm is only passed UTF-8 ASCII-compatible
strings.

9 years agoFix 'access_log none' to prevent following logs being used
Amos Jeffries [Fri, 1 May 2015 07:24:56 +0000 (00:24 -0700)] 
Fix 'access_log none' to prevent following logs being used

The documented behaviour of "access_log none" for preventing logging
using log lines following the directive has not been working in
Squid-3 for some time.

Since the 'none' type does not have a log module associated the entire
switch logic where its abort is checked for was being skipped.

9 years agoDocs: updtae CONTRIBUTORS
Source Maintenance [Thu, 23 Apr 2015 14:09:14 +0000 (14:09 +0000)] 
Docs: updtae CONTRIBUTORS

9 years agoDocs: Update CONTRIBUTORS
Source Maintenance [Thu, 23 Apr 2015 13:44:54 +0000 (13:44 +0000)] 
Docs: Update CONTRIBUTORS

9 years agoDocumentation updates
Amos Jeffries [Wed, 18 Feb 2015 10:41:49 +0000 (02:41 -0800)] 
Documentation updates

9 years agoDocs: drop obsolete chunked_request_body_max_size references
Amos Jeffries [Sat, 24 Jan 2015 05:22:21 +0000 (21:22 -0800)] 
Docs: drop obsolete chunked_request_body_max_size references

This option has done nothing since Squid-3.2.

9 years agoFix various ICMP handling issues in Squid pinger
Amos Jeffries [Mon, 15 Sep 2014 05:08:18 +0000 (23:08 -0600)] 
Fix various ICMP handling issues in Squid pinger

* ICMP code type logging display could over-read the registered type
  string arrays.

* Malformed ICMP packets were accepted into processing with undefined
  and potentially nasty results.

Both sets of flaws can result in pinger segmentation fault and halting
the Squid functionality relying on pinger for correct operation.

 Thanks to the OpenSUSE project for analysis and resolution of these.

9 years agoFix off by one in SNMP subsystem
Sebastian Krahmer [Mon, 15 Sep 2014 04:59:53 +0000 (22:59 -0600)] 
Fix off by one in SNMP subsystem

9 years agoIgnore Range headers with unidentifiable byte-range values
Amos Jeffries [Wed, 27 Aug 2014 14:36:22 +0000 (08:36 -0600)] 
Ignore Range headers with unidentifiable byte-range values

If squid is unable to determine the byte value for ranges, treat the
header as invalid.

10 years ago3.2.13 SQUID_3_2_13
Amos Jeffries [Sat, 13 Jul 2013 13:22:08 +0000 (07:22 -0600)] 
3.2.13

10 years agoBetter handling of strange port values in Host:
Amos Jeffries [Sat, 13 Jul 2013 12:41:08 +0000 (06:41 -0600)] 
Better handling of strange port values in Host:

We can do better than just producing errors about invalid port details
and treating it as port-0.
We can instead undo the port separation and pass it through as part of
the host name to be verified with the default port number properly
assumed.

10 years agoBug 3869: assertion failed: MemBuf.cc:272: size < capacity
Amos Jeffries [Sat, 13 Jul 2013 12:38:06 +0000 (06:38 -0600)] 
Bug 3869: assertion failed: MemBuf.cc:272: size < capacity

10 years ago3.2.12 SQUID_3_2_12
Amos Jeffries [Thu, 11 Jul 2013 05:23:56 +0000 (23:23 -0600)] 
3.2.12

10 years agoProtect against buffer overrun in DNS query generation
Nathan Hoad [Wed, 10 Jul 2013 12:45:05 +0000 (06:45 -0600)] 
Protect against buffer overrun in DNS query generation

see SQUID-2013:2.

This bug has been present as long as the internal DNS component however
most code reaching this point is passing through URL validation first.
With Squid-3.2 Host header verification using DNS directly we may have
problems.

10 years agoRevert rev.11818 - not applicable to 3.2.
Amos Jeffries [Mon, 20 May 2013 06:02:24 +0000 (00:02 -0600)] 
Revert rev.11818 - not applicable to 3.2.

10 years agoAllocate ClientInfo::hash.key using malloc() instead of new char[]
Alex Rousskov [Sun, 19 May 2013 03:46:58 +0000 (21:46 -0600)] 
Allocate ClientInfo::hash.key using malloc() instead of new char[]

... because it is destroyed using safe_free() instead of delete[].

Added ClientInfo construction/destruction debugging to find leaking objects.

10 years agoRemove origin_tries limiter on forwarding
Amos Jeffries [Sun, 19 May 2013 03:45:03 +0000 (21:45 -0600)] 
Remove origin_tries limiter on forwarding

This limit seems to have been set to prevent large amount of looping when
DIRECT attempts fail under the old model of constant DNS lookups and
retries.

However it is hard-coded and has no configuration knob visible. Under
the curent model of all destinations being enumerated once and tried
sequentially this protection would seem to be no longer necessary and
somewhat harmful as it will be preventing retries reaching destinations
with more than 2 unreachable IPs (think 3 IPv6 and an IPv4 on IPv4-only
network).

10 years agoFixed leaking configurable SSL error details.
Alex Rousskov [Sun, 19 May 2013 03:44:04 +0000 (21:44 -0600)] 
Fixed leaking configurable SSL error details.

Trunk r11496 "Configurable SSL error details messages" correctly disabled
collection of HTTP statistics for non-HTTP header fields, such as configurable
SSL error details. However, it also incorrectly disabled deletion of those
non-HTTP header fields.

Configurable SSL error details are only created during [re]configuration time,
so the leak went unnoticed since 2011-06-17, but the same bug caused a major
runtime annotation leak later (r12413) until the new annotation code was
redesigned to avoid using HttpHeader (r12779).

10 years agoFix memory error with Kerberos authentication
Markus Moeller [Sun, 19 May 2013 03:37:59 +0000 (21:37 -0600)] 
Fix memory error with Kerberos authentication

Uninitialized variable 'dp' shows up as
"glibc detected (ext_kerberos_ldap_group_acl): double free or corruption"

see mailing list thread for full details:
http://www.squid-cache.org/mail-archive/squid-users/201305/0031.html

10 years agoAvoid !closing assertions when helpers call comm_read [during reconfigure].
Alex Rousskov [Sun, 19 May 2013 03:37:02 +0000 (21:37 -0600)] 
Avoid !closing assertions when helpers call comm_read [during reconfigure].

While helper reading code does check for COMM_ERR_CLOSING, it is not sufficient
because helperReturnBuffer() called by the reading code may notice the helper
shutdown flag (set earlier by reconfigure) and start closing the connection
underneath the reading code feet.

10 years agoAvoid Comm::Connection leaks when helpers are reconfigured or otherwise closed.
Alex Rousskov [Sun, 19 May 2013 03:35:34 +0000 (21:35 -0600)] 
Avoid Comm::Connection leaks when helpers are reconfigured or otherwise closed.

CBDATA_CLASS2 classes must be deleted using C++ delete, not cbdataFree().
cbdataFree() does not call the class destructor.

10 years agoAdd missing piece omitted from rev.9677
Silamael [Sun, 19 May 2013 03:32:38 +0000 (21:32 -0600)] 
Add missing piece omitted from rev.9677

rev.9677 created forward_max_tries directive but omitted one of the
checks. This adds that check and allows forward_max_tries to be set
to values greater than 10.

11 years ago3.2.11 SQUID_3_2_11
Amos Jeffries [Tue, 30 Apr 2013 04:46:58 +0000 (22:46 -0600)] 
3.2.11

11 years agoUpdated copyright for icons/SN.png
Amos Jeffries [Sun, 28 Apr 2013 11:06:05 +0000 (05:06 -0600)] 
Updated copyright for icons/SN.png

The NC (Non-Commercial) clause conflicts with FOSS software distribution
policies and requirements of some of our downstream distributors.

By resolution of The Squid Software Foundation board of directors in
meeting #6 on 28-04-2013 this icon now has the NC clause removed.

11 years agoRevert r11810 - tools.h does not exist in 3.2
Amos Jeffries [Sat, 27 Apr 2013 14:22:01 +0000 (08:22 -0600)] 
Revert r11810 - tools.h does not exist in 3.2

11 years ago3.2.10 SQUID_3_2_10
Amos Jeffries [Sat, 27 Apr 2013 03:07:00 +0000 (21:07 -0600)] 
3.2.10

11 years agoFix enter_suid/leave_suid build errors in ip/Intercept.cc
Amos Jeffries [Sat, 27 Apr 2013 02:36:33 +0000 (20:36 -0600)] 
Fix enter_suid/leave_suid build errors in ip/Intercept.cc

 Intercept.cc:210: error: 'enter_suid' was not declared in this scope
 Intercept.cc:217: error: 'leave_suid' was not declared in this scope

We should just be including tools.h, but on some GCC the src/tools.h and
src/ip/tools.h include locations clash when building inside src/ip/.
For now we must reference the src/tools.h by its long path.

11 years agoGNU Hurd: define MAP_NORESERVE as no-op when missing
Amos Jeffries [Fri, 26 Apr 2013 04:12:14 +0000 (22:12 -0600)] 
GNU Hurd: define MAP_NORESERVE as no-op when missing

Some systems like GNU Hurd provide the mmap() API but lack MAP_NORESERVE
support. This option is an optimization, so we can define the macro
ourselves to nil and apparently not suffer (many) bad side effects.

11 years agoBug 3833: Option '-k' is not present in squidclient man page
Amos Jeffries [Fri, 26 Apr 2013 04:11:49 +0000 (22:11 -0600)] 
Bug 3833: Option '-k' is not present in squidclient man page

11 years agoBug 3817: Memory leak in SSL cert validate for alt_name peer certs
Christos Tsantilas [Fri, 26 Apr 2013 04:10:24 +0000 (22:10 -0600)] 
Bug 3817: Memory leak in SSL cert validate for alt_name peer certs

Inside function Ssl::matchX509CommonNames which checks a domain name against
certificate common name and alternate names, if the domain matches any of the
alternate names the function return without releasing allocated data.

11 years agoBug 3822: Locate LDAP and SASL headers in /usr/local/include for BSD support
Stuart Henderson [Fri, 26 Apr 2013 04:08:34 +0000 (22:08 -0600)] 
Bug 3822: Locate LDAP and SASL headers in /usr/local/include for BSD support

11 years agoBug 3825: basic_ncsa_auth segfaulting with glibc-2.17
Michal Luscon [Fri, 26 Apr 2013 04:06:48 +0000 (22:06 -0600)] 
Bug 3825: basic_ncsa_auth segfaulting with glibc-2.17

It appears the crypt() function may return NULL strings. Check for those
before all strcmp() operations.

NOTE: The MD5 output checks are probably not needed but since SquidMD5 is
an object build-time switched between several encryption library API
definitions it is better to be safe here as well.

11 years agoBug 3774: -k reconfigure drops rock
Alexandre Chappaz [Fri, 29 Mar 2013 06:54:15 +0000 (00:54 -0600)] 
Bug 3774: -k reconfigure drops rock

This fix keeps Rock cache_dirs visible to Cache Manager after reconfigure.
We still lack proper support for complex reconfiguration changes involving
cache_dirs.

11 years agoBug 3565: Resuming postponed accept kills Squid
Amos Jeffries [Fri, 29 Mar 2013 06:18:05 +0000 (00:18 -0600)] 
Bug 3565: Resuming postponed accept kills Squid

This implements part 1 of Alex proposed fixes outlined in bug 3565.
Crashes with deferred accept() pointer dereference.

It replaces the raw-pointers stored in AcceptLimiter with a new
TcpAcceptor::Pointer.

It also adds a bit of TODO documentation about future optimizations which
we might want to consider later.

11 years agoHTTP/1.1: partial support for no-cache and private controls with parameters
Amos Jeffries [Fri, 29 Mar 2013 06:13:27 +0000 (00:13 -0600)] 
HTTP/1.1: partial support for no-cache and private controls with parameters

Since we now support HTTP/1.1 storage and revalidation of
Cache-Control:no-cache it is important that we at least detect the cases
where no-cache= and private= contain parameters.

These are likely still rare occurances due to the historic lack of
support. So for now Squid just detects and exempts these responses from
the caching performed. The basic framework for adding handling of the
header lists is made available but not at this time used.

11 years agossl_crtd: helpers dying during startup on ARM
folkert [Fri, 29 Mar 2013 06:12:30 +0000 (00:12 -0600)] 
ssl_crtd: helpers dying during startup on ARM

11 years ago3.2.9 SQUID_3_2_9
Amos Jeffries [Tue, 12 Mar 2013 10:12:56 +0000 (04:12 -0600)] 
3.2.9

11 years agoFix authentication headers sent on peer digest requests
Amos Jeffries [Fri, 8 Mar 2013 09:32:25 +0000 (02:32 -0700)] 
Fix authentication headers sent on peer digest requests

Cache digest fetches have been sending the cache_peer login= option
value without sanitizing it for special-case values used internally
by Squid. This causes authentication failure on peers which are checking
user credentials.

11 years agoSolaris, OpenIndiana: Add missing limits.h includes
Amos Jeffries [Fri, 8 Mar 2013 09:31:33 +0000 (02:31 -0700)] 
Solaris, OpenIndiana: Add missing limits.h includes

11 years agoBug 3673: Silence 'Failed to select source' messages
Amos Jeffries [Fri, 8 Mar 2013 02:15:39 +0000 (19:15 -0700)] 
Bug 3673: Silence 'Failed to select source' messages

11 years agoRegression fix: Accept-Language header parse
Amos Jeffries [Fri, 8 Mar 2013 02:06:11 +0000 (19:06 -0700)] 
Regression fix: Accept-Language header parse

When handling error page negotiation the header parse to detect language
code can enter into an infinite loop. Recover the 3.1 series behaviour
and fix an additional pre-existing off-by-1 error.

The errors were introduced in trunk rev.11496 in 3.2.0.9.

11 years ago3.2.8 SQUID_3_2_8
Amos Jeffries [Sat, 2 Mar 2013 01:45:31 +0000 (18:45 -0700)] 
3.2.8

11 years agoprep for 3.2.8
Amos Jeffries [Sat, 2 Mar 2013 01:30:30 +0000 (18:30 -0700)] 
prep for 3.2.8

11 years agoDocs: document ConnOpener::swanSong() better
Amos Jeffries [Fri, 1 Mar 2013 11:05:57 +0000 (04:05 -0700)] 
Docs: document ConnOpener::swanSong() better

11 years agoBug 3329: Quieten orphan Comm::Connection messages
Amos Jeffries [Fri, 1 Mar 2013 11:05:08 +0000 (04:05 -0700)] 
Bug 3329: Quieten orphan Comm::Connection messages

The cases which were earlier causing a lot of RAM 'leaks' have been
resolved already and the remaining causes appear to all be in components
with short packet handling pathways where the orphan is not wasting much
in the way of RAM bytes or FD time.

The trace is left at level-4 for future debugging if necessary.

11 years agoSync TESTDIR names used by testCoss and testUfs with testRock changes.
Alex Rousskov [Fri, 1 Mar 2013 11:04:41 +0000 (04:04 -0700)] 
Sync TESTDIR names used by testCoss and testUfs with testRock changes.

11 years agoMacOS: reduce the testRock unit test UDS path
Amos Jeffries [Fri, 1 Mar 2013 11:03:38 +0000 (04:03 -0700)] 
MacOS: reduce the testRock unit test UDS path

On MacOS shm_open() requires the name entry to be less than 31 bytes
long. The garbage name used by testRock was 35 bytes and not really
describing what it was used for in the test anyway.

TODO: find out and fix why MacOS still responds EINVAL once the path
      is set to a usable length.

11 years agoDocs: Polish debugs in cacheability test
Amos Jeffries [Fri, 1 Mar 2013 11:00:10 +0000 (04:00 -0700)] 
Docs: Polish debugs in cacheability test

11 years agoBug 3753: Removes the domain from the cache_peer server pconn key
Amos Jeffries [Fri, 1 Mar 2013 10:58:07 +0000 (03:58 -0700)] 
Bug 3753: Removes the domain from the cache_peer server pconn key

Under the squid-3.2 pconn model the IP:port specifying the destination
are part of the key and can be used to strictly filter selection when
locating pconn.  This means the domain is no longer a necessary part
of the key.

Squid using cache_peer can see a large number of wasted idle connections
to their peers due to the key domain value if the peer hostname is not
substituted properly. There is also a similar affect when contacting
servers with virtual hosted domains.

Also bug 3753 was located with peer host and name= values being used
inconsistently as the domain marker. Resulting in failed pop()
operations and extra FD usage.

This has been tested for several months now with only socket usage
benefits seen in several production networks.

NOTE: previous experience some years back with pconn has demonstrated
several broken web servers which assume all requests on a persistent
connection are for the same virtual host. For now this change avoids
altering the behaviour on DIRECT traffic for this reason.

This was sponsored by Treehouse Networks Ltd.

11 years agoDocs: Mention creation of diskers in cache_dir rock
Alex Rousskov [Fri, 1 Mar 2013 10:49:54 +0000 (03:49 -0700)] 
Docs: Mention creation of diskers in cache_dir rock

11 years agoBug 3763: diskd Error: no filename in shm buffer
Amos Jeffries [Sat, 16 Feb 2013 02:30:04 +0000 (19:30 -0700)] 
Bug 3763: diskd Error: no filename in shm buffer

11 years agoSolaris: Fix xstrto*() function linkages
Amos Jeffries [Sat, 16 Feb 2013 02:29:11 +0000 (19:29 -0700)] 
Solaris: Fix xstrto*() function linkages

These functions are only used by C++ code now and can be hidden from
the .c files.

11 years agoFix coverity scan issue 740457: unsecure temporary file creation
Francesco Chemolli [Sat, 16 Feb 2013 02:28:01 +0000 (19:28 -0700)] 
Fix coverity scan issue 740457: unsecure temporary file creation

11 years agoBug 3686: cache_dir max-size default fails
Amos Jeffries [Sat, 16 Feb 2013 02:26:31 +0000 (19:26 -0700)] 
Bug 3686: cache_dir max-size default fails

If some cache_dir are configured with max-size and some not the default
maximum_object_size limit fails.

This refactors the max-size management code such that each SwapDir always
has a value maxObjectSize(). This value is calculated from the SwapDir
local setting or global limit as appropriate.

The global maximum_object_size directive is migrated to simply be a default
for cache_dir max-size= option.

The global store_maxobjsize variable is altered to be the overall global
limit on how big an object may be cache by this proxy. It now takes into
account the max-size for all cache_dir and cache_mem limitation.

NP: The slow accumulation of these and earlier changes means Squid no
longer immediately caches unknown-length objects. The unit-tests are
therefore changed to test using explicit 0-length objects to ensure the
test is on a cached object not bypassing the apparently ested logic.
They are also provided with a large global store_maxobjsize limit in order
to do a weak test of the SwapDir types max-size in the presence of other
larger cache_dir or maximum_object_size settings.

11 years agoBug 3752: objects that cannot be cached in memory are not cached on disk if cache_dir...
Alex Rousskov [Fri, 15 Feb 2013 09:36:03 +0000 (02:36 -0700)] 
Bug 3752: objects that cannot be cached in memory are not cached on disk if cache_dir max-size is used.

This fix contains four related changes:

1) When fixing "trimMemory for unswappable objects" (trunk r11969), we
replaced swapoutPossible() with swappingOut()||mayStartSwapOut() but missed
the fact that swapoutPossible() had "possible now" semantics while
mayStartSwapOut() has "may start now or in the future" semantics. When all
cache_dirs had max-size set, mayStartSwapOut() returned false for objects of
unknown size and even for smaller-than-maximum but not-yet-received objects,
despite the fact that those objects could be swapped out later.

That false mayStartSwapOut() result allowed maybeTrimMemory() to trim those
objects memory and mark the objects for release, preventing their subsequent
disk caching.

2) To fix (1) above, mayStartSwapOut() had to return true for not-yet-received
objects of unknown size. However, returning true is correct only if no
subsequent check can return false. Thus, we had to move all lower/later checks
that could return false up, placing them before the maximum-of-all-max-sizes
check.

3) Once (2) was done, the end of mayStartSwapOut() had (a) a loop that could
return true while setting decision to MemObject::SwapOut::swPossible and (b)
an unconditional code that did ... the same thing. Thus, the loop could no
longer change the method outcome. The loop also had a lot of doubts and XXXs
attached to it. We removed it. If that loop is needed, it is needed and must
be resurrected elsewhere.

4) Since mayStartSwapOut() returns true if swapout is possible in the future
(but not necessarily now), we cannot rely on its return value to initiate
swapout code. We need to test whether swapout.decision is swPossible instead.

11 years agoRelease Notes: update and spelling corrections
Amos Jeffries [Sat, 9 Feb 2013 07:15:55 +0000 (00:15 -0700)] 
Release Notes: update and spelling corrections

* Move the formal deprecation of upgrade_headers to 3.2.
* spell-check 3.2 release notes
* spell-check squid.conf.documented

11 years agoBug 3767: tcp_outgoing_tos/mark ACLs do not obey acl_uses_indirect_client
Nick Rogers [Sat, 9 Feb 2013 07:05:40 +0000 (00:05 -0700)] 
Bug 3767: tcp_outgoing_tos/mark ACLs do not obey acl_uses_indirect_client

11 years agoDocs: handle unknown squid-2.7 directives cleaner
Amos Jeffries [Sat, 9 Feb 2013 07:05:03 +0000 (00:05 -0700)] 
Docs: handle unknown squid-2.7 directives cleaner

This uses the squid-3 'obsolete' directive logics to cleanly accept and
warn about squid-2.7 directives which are not yet ported to squid-3.

11 years agoPolish debugs on more obsolete options
Amos Jeffries [Sat, 9 Feb 2013 07:04:42 +0000 (00:04 -0700)] 
Polish debugs on more obsolete options

11 years agoMake squid -z for cache_dir rock work like UFS instead of like COSS.
Alex Rousskov [Sat, 9 Feb 2013 06:44:36 +0000 (23:44 -0700)] 
Make squid -z for cache_dir rock work like UFS instead of like COSS.

Also, Polish -z documentation and cache.log reporting.

When a startup script runs squid -z by mistake against a cache_dir that is
already initialized and full of cached entries, some admins prefer that
nothing happens. Rock store now skips reinitialization if both the cache_dir
directory and the db file in that directory exist. If one or both are missing,
the missing pieces are created.

UFS does something similar because it creates missing L1 and L2 directories
but does not erase any entries already present in the cache_dir path. COSS,
OTOH, re-initializes the existing db. Rock behavior will now be closer to UFS.

To clean a corrupted cache_dir, the admin must remove its top-level directory
before running squid -z.

Squid now logs "Creating missing swap directories" instead of "Creating Swap
Directories", and our documentation now reflects the "if missing" part of the
-z algorithm.

Also documented that recent Squid versions run -z in daemon mode (so that SMP
configuration macros continue to work).

11 years agoFix parsing of max-stale values in Surrogate-Control header
Amos Jeffries [Sat, 9 Feb 2013 06:42:44 +0000 (23:42 -0700)] 
Fix parsing of max-stale values in Surrogate-Control header

Skip parsing of the max-stale field when the initial max-age value
is not a valid integer value.

 Detected by Coverity Scan. Issue 740361

11 years agoBug 3723: tcp_outgoing_tos/mark broken for CONNECT requests
Sebastien Wenske [Sat, 9 Feb 2013 06:40:29 +0000 (23:40 -0700)] 
Bug 3723: tcp_outgoing_tos/mark broken for CONNECT requests

11 years agoBug 3515: crash in FtpStateData::ftpTimeout
Amos Jeffries [Sat, 9 Feb 2013 06:38:09 +0000 (23:38 -0700)] 
Bug 3515: crash in FtpStateData::ftpTimeout

Since revision squid-3.2-11174 restructured teh TCO connection handling
in FTP the data connection has had separate 'opener' connection.
Meaning the conn->fd state is always NULL when the setup times out.

This cleans up the data connection opener state and allows the error
message generation to take place.

11 years agoFixed several ConnOpener problems
Alex Rousskov [Sat, 9 Feb 2013 06:36:36 +0000 (23:36 -0700)] 
Fixed several ConnOpener problems

... by relying on AsyncJob protections and comm_close(), while maintaining a
tighter grip on various I/O and sleep states.

Problems addressed:

* Connection descriptor was not closed when attempting to reconnect after
  failures. We now properly close on failures, sleep with descriptor closed,
  and then reopen.

* Timeout handler was not cleaned up properly in some cases, causing memory
  leaks (for the handler Pointer) and possibly timeouts that were fired (for
  then-active handler) after the connection was passed to the initiator.

* Comm close handler was not cleaned up properly.

* statCounter.syscalls.sock.closes counter was not updated on FD closure.

* Waiting pending accepts were not kicked on FD closure.

* Connection timeout was enforced for each connection attempt instead of
  applying to all attempts taken together.

and possibly other problems. The full extent of all side-effects of mishandled
race conditions and state conflicts is probably unknown.

11 years agoBug 3749: IDENT lookup using wrong ports to identify the user
Amos Jeffries [Sat, 9 Feb 2013 06:31:57 +0000 (23:31 -0700)] 
Bug 3749: IDENT lookup using wrong ports to identify the user

11 years ago3.2.7 SQUID_3_2_7
Amos Jeffries [Fri, 1 Feb 2013 10:54:21 +0000 (03:54 -0700)] 
3.2.7

11 years agoFix ipv6 enabled pinger.
Amos Jeffries [Fri, 1 Feb 2013 04:58:59 +0000 (21:58 -0700)] 
Fix ipv6 enabled pinger.

Was failing with assertion failure due to ipv6 support not being probed
automatically.

11 years agoBug 3687: unhandled exception: c when using interception and peers
Amos Jeffries [Fri, 1 Feb 2013 04:57:13 +0000 (21:57 -0700)] 
Bug 3687: unhandled exception: c when using interception and peers

11 years agoBug 3111: Mid-term fix for the forward.cc "err" assertion.
Alex Rousskov [Fri, 1 Feb 2013 04:56:07 +0000 (21:56 -0700)] 
Bug 3111: Mid-term fix for the forward.cc "err" assertion.

The assert is triggered when a close handler for the server connection
destroys FwdState before we have received anything from the origin
server.
Instead of asserting, we now respond with a 502 (Bad Gateway)
ERR_READ_ERROR.

That error seems the most appropriate single choice among available
ones, but
it may be misleading (in access.log) when the close handler was called
due to
client problems. Hopefully, another error will be logged in most of
those
cases.

11 years agoSupport OpenSSL NO_Compression option
Sebastien Wenske [Fri, 1 Feb 2013 04:54:23 +0000 (21:54 -0700)] 
Support OpenSSL NO_Compression option

This option tells OpenSSL to disable TLS compression. A recent version
of OpenSSL library is required for this option to be available

11 years agoFix WCCPv2 'comparison between signed and unsigned integer expressions'
Amos Jeffries [Tue, 29 Jan 2013 07:00:55 +0000 (00:00 -0700)] 
Fix WCCPv2 'comparison between signed and unsigned integer expressions'

11 years agoBug 3567: Memory leak handling malformed requests
Amos Jeffries [Mon, 28 Jan 2013 11:49:40 +0000 (04:49 -0700)] 
Bug 3567: Memory leak handling malformed requests

11 years agoBug 3735: raw-IPv6 domain URLs crash if IPv6-disabled
Amos Jeffries [Mon, 28 Jan 2013 11:48:06 +0000 (04:48 -0700)] 
Bug 3735: raw-IPv6 domain URLs crash if IPv6-disabled

11 years agoBug 3732: Fix ConnOpener IPv6 awareness
Amos Jeffries [Mon, 28 Jan 2013 11:45:07 +0000 (04:45 -0700)] 
Bug 3732: Fix ConnOpener IPv6 awareness

When updating IPv6 support for split-stack one USE_IPV6 wrapper was
omitted conversion to the EnabledIpv6 stack auto-detect mechanism.
This resulted in IPv6 addresses being mis-converted on split-stack
systems or with IPv6 disabled in the kernel and --enable-ipv6 built.

The visible symptom is "assert(FALSE)" in Ip::Address::GetAddrInfo().

11 years agoInitialize mem_node fully
Amos Jeffries [Mon, 28 Jan 2013 11:41:04 +0000 (04:41 -0700)] 
Initialize mem_node fully

Experience in squid-2.7 shows that with MemPools use of malloc instead
of calloc mem_node requires full initialization in order to get accurate
memory accounting.

Also closes Coverity Scan defect issue 740573.

11 years agoBug 3736: Floating point exception due to divide by zero
Tianyin Xu [Mon, 28 Jan 2013 11:40:12 +0000 (04:40 -0700)] 
Bug 3736: Floating point exception due to divide by zero

11 years agoFix "address.GetPort() != 0" assertion for helpers on FreeBSD (at least).
Alex Rousskov [Mon, 28 Jan 2013 11:29:16 +0000 (04:29 -0700)] 
Fix "address.GetPort() != 0" assertion for helpers on FreeBSD (at least).

The order (or set of?) #include files used by src/ssl/helper.cc (and
probably by other helper source files) has changed recently, exposing a
defines.h dependency on sys/socket.h where that system header is
required to define AF_UNIX. With AF_UNIX incorrectly undefined,
IPC_STREAM was set to IPC_TCP_SOCKET instead of IPC_UNIX_STREAM, and
helpers that do not have a notion of a listening port, were trying to
create communication sockets using TCP streams, triggering a "must have
a port" assertion in comm_connect_addr() called from ipcCreate().

TODO: Moving IPC_* defines into an IPC-specific header file may be a
better solution then exposing all defines.h users to sys/socket.h.

11 years agoWCCP: Fix memory leak in mask assignment, improve debuggsing.
Amos Jeffries [Mon, 28 Jan 2013 11:25:34 +0000 (04:25 -0700)] 
WCCP: Fix memory leak in mask assignment, improve debuggsing.

* Release temporary weight array allocated on each HERE_I_AM packet sent
  by Squid. For mask assignment these were not released properly and may
  build up to a significant size of memory over time.

* Add debug traces to send() events to report failures sending packets

* Also, on HERE_I_AM event send() failure, reduce the timeout to 2sec
  for the retry in a crude attempt to prevent router state flapping.

* Silence compiler warnings on use of connect() to disconnect a socket.
  Inconsistent OS behaviour makes the result useless in this case.

 Detected by Coverity Scan. Issues 740329, 740330, 740331, 740332,
    740333, 740441.

11 years agoPolish quick_abort feature decision code
Amos Jeffries [Mon, 28 Jan 2013 11:23:27 +0000 (04:23 -0700)] 
Polish quick_abort feature decision code

Also, fixes a defect identified by Coverity Scan issues 740376, 740456

11 years agoFix memory leak in IP address unit test
Amos Jeffries [Mon, 28 Jan 2013 11:22:25 +0000 (04:22 -0700)] 
Fix memory leak in IP address unit test

Another failure to call FreeAddrInfo() after calling GetAddrInfo().

 Detected by Coverity Scan. Issue 740438.

11 years agoFix memory leaks in ICMP
Amos Jeffries [Mon, 28 Jan 2013 09:59:18 +0000 (02:59 -0700)] 
Fix memory leaks in ICMP

InitAddrInfo() and GetAddrInfo() both allocate addrinfo structs which
must be freed by FreeAddrInfo(). Several places in ICMP were not doing
that free step.

 Detected by Coverity Scan. Issues 740434, 740435, 740436, 740437.

11 years agoBug 3729: 32-bit overflow in parsing 64-bit configuration values
Tianyin Xu [Mon, 28 Jan 2013 09:58:16 +0000 (02:58 -0700)] 
Bug 3729: 32-bit overflow in parsing 64-bit configuration values

11 years agoFix various Disk I/O issues in all modules
Tomas Hozza [Mon, 28 Jan 2013 05:43:11 +0000 (22:43 -0700)] 
Fix various Disk I/O issues in all modules

* Uninitialized class members.

* Handle NULL potential after several dynamic_cast.

* Better error result handling from several system functions
  lseek(), fcntl() can report errors which need handling.

* diskd explicit NULL dereference on broken input.
  Extremely unlikely, but worth protecting against.

 Detected by Coverity Scan. Issues 740510, 740358, 740359,
  740511, 740317, 740360, 740513, 740318, 740514

11 years agoFix error in config parser which would mis-assign the sslcrlfile directive.
Francesco Chemolli [Mon, 28 Jan 2013 05:40:06 +0000 (22:40 -0700)] 
Fix error in config parser which would mis-assign the sslcrlfile directive.

Also, fix potentially crashing flaw in CPU affinity map display code.

  Detected by Coverity Scan, defects 740336 and 740337.

11 years agoPlugged memory leaks in digest authentication module
Francesco Chemolli [Mon, 28 Jan 2013 05:39:19 +0000 (22:39 -0700)] 
Plugged memory leaks in digest authentication module

  Detected by Coverity Scan. Issue 740431.

11 years agoBug 3728: Improve debug for cache_dir
Tianyin Xu [Mon, 28 Jan 2013 04:33:00 +0000 (21:33 -0700)] 
Bug 3728: Improve debug for cache_dir

11 years agoMake sure copied strings are properly terminated in snmplib and wccp2
Tomas Hozza [Mon, 28 Jan 2013 04:30:26 +0000 (21:30 -0700)] 
Make sure copied strings are properly terminated in snmplib and wccp2

11 years agoFix various issues in snmplib
Tomas Hozza [Mon, 28 Jan 2013 04:28:17 +0000 (21:28 -0700)] 
Fix various issues in snmplib

* Memory leaks in OID management

* NULL pointer dereference on OID tree creation

* Ensure buffer terminations on OID data copy

* Better file handle management

  Detected by Coverity Scan. Issues 740480, 740357, 740429,
    443111, 740479, 740500

11 years agoFix various issues in smblib
Tomas Hozza [Mon, 28 Jan 2013 04:27:32 +0000 (21:27 -0700)] 
Fix various issues in smblib

* Crash on NTLM handshakes without domain.

* Memory leak on several internal DC connection failures

* Potential buffer overruns on specially crafted tokens

  Detected by Coverity Scan. Issues 740356, 740406, 740428,
   740476, 740477, 740478