]> git.ipfire.org Git - thirdparty/squid.git/commit
Cert Validation memory leaks
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 15 Feb 2016 11:29:50 +0000 (00:29 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 15 Feb 2016 11:29:50 +0000 (00:29 +1300)
commit6cc1de1106f531979776ae857d06028eb370c26b
treeb14482ce056ebee3beeb7372c3c30a6ecb2a413d
parent373385fc9160bfe060e77ba83f62c6301b7ad756
Cert Validation memory leaks

In the case SSL errors detected by certificate validator helper the objects
stored in Ssl::ServerBump::sslErrors  member and will never released.
This member normally points to an Ssl::CertErrors list attached to the related
SSL object which is responsible to release this list.
When the cert validator detects errors a new errors list created and attached
to the related Ssl::ServerBump::sslErrors member but the SSL objects still
hold the old one. The old list released but not the new one.

This patch also fixes the case the cbdata protected  Ssl::CertErrors list,
still is used through the related Ssl::ServerBump object but it is not valid
any more, because the SSL object which hold it gone.

This patch instead of storing the Ssl::CertErrors list to Ssl::ServerBump
object stores the SSL object and increases its reference to avoid be released

  This is a Measurement Factory project
src/acl/FilledChecklist.h
src/client_side.cc
src/ssl/PeerConnector.cc
src/ssl/ServerBump.cc
src/ssl/ServerBump.h
src/ssl/gadgets.h