Squid 5.6 leaking memory when peeking for an origin with an invalid certificate

Hamilton Coutinho <[email protected]> Wed, 18 Jan 2023 10:46:33 -0800
Newsgroups gmane.comp.web.squid.devel
Message-ID <CAL34ibm-a1GiedEOHO2LcCYzRZuJt_4Dm4ZjJfkEdweC5BNoYw@mail.gmail.com>
Hi all,

We are observing what seems to be several objects leaking in the output
mgr:mem, to the tune of 10s of 1000s
of HttpRequest, HttpHeaderEntry, Comm::Connection,
Security::ErrorDetail, cbdata
PeekingPeerConnector (31), etc.

We dumped a core and managed to find some HttpRequest objects and they all
seem to have failed in the same way, with an ERR_SECURE_CONNECT_FAIL
category, for a site that has a certificate signed by a CA authority not
available to squid.

If I would guess, the origin of the problem might be in
Ssl::PeekingPeerConnector::checkForPeekAndSpliceMatched():

    if (finalAction == Ssl::bumpTerminate) {
        bail(new ErrorState(ERR_SECURE_CONNECT_FAIL, Http::scForbidden,
request.getRaw(), al));
        clientConn->close();
        clientConn = nullptr;

Wondering if assigning null to clientConn there would be premature.

Any thoughts?

Thanks!

-- 
Hamilton

_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev