possible memory leak in zlib compression

View: New views
3 Messages — Rating Filter:   Alert me  

possible memory leak in zlib compression

by Dustin Kirkland-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to solve a reproducible memory leak that manifests itself
with SSL + Apache2:
    https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/224945

Valgrind, plus our own research, points to a possible memory leak in
crypto/comp/c_zlib.c in libssl0.9.8g.

We see:
        struct zlib_state *state = -> (struct zlib_state
*)OPENSSL_malloc(sizeof(struct zlib_state));
allocating the data.

However, it does not seem that a zlib_stateful_free_ex_data() is called
to free it.


Thanks,
:-Dustin

Dustin Kirkland
Ubuntu Server Developer
Canonical, LTD
GPG: 1024D/83A61194
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...

Re: possible memory leak in zlib compression

by Ruediger Pluem-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 05/12/2008 05:38 PM, Dustin Kirkland wrote:

> I'm trying to solve a reproducible memory leak that manifests itself
> with SSL + Apache2:
>     https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/224945
>
> Valgrind, plus our own research, points to a possible memory leak in
> crypto/comp/c_zlib.c in libssl0.9.8g.
>
> We see:
>         struct zlib_state *state = -> (struct zlib_state
> *)OPENSSL_malloc(sizeof(struct zlib_state));
> allocating the data.
>
> However, it does not seem that a zlib_stateful_free_ex_data() is called
> to free it.

I guess you are hit by what is already fixed in the httpd trunk in r654119:

http://svn.apache.org/viewvc?rev=654119&view=rev

Regards

RĂ¼diger
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...

Re: possible memory leak in zlib compression

by Dustin Kirkland-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, May 12, 2008 at 3:12 PM, Ruediger Pluem <r.pluem@...> wrote:
>  I guess you are hit by what is already fixed in the httpd trunk in r654119:
>
>  http://svn.apache.org/viewvc?rev=654119&view=rev

Yes, thank you, that is it precisely.  We are patching Apache2 for
Ubuntu and working on updated packages.

Thanks,
:-Dustin
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...