md5 collision

Maxim Dounin mdounin at
Thu Sep 13 12:48:15 UTC 2012


On Thu, Sep 13, 2012 at 07:07:09AM -0400, karlseguin wrote:

> Hi,
> Looking for help with a high number of md5 collisions with proxy caching.
> It's my understanding that we shouldn't be getting any, but we seem to be
> getting quite a few.

What makes you think that there are md5 collisions?  Do you see 
nginx complaining in error log?

> -V
> nginx version: nginx/1.2.3
> built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

Uhm, am I right assuming it's on ARM?

> configure arguments: --prefix=/opt/nginx --with-http_stub_status_module
> --with-pcre=../pcre-8.31 --without-http_access_module
> --without-http_auth_basic_module --without-http_autoindex_module
> --without-http_browser_module --without-http_charset_module
> --without-http_fastcgi_module --without-http_geo_module
> --without-http_memcached_module --without-http_referer_module
> --without-http_scgi_module --without-http_split_clients_module
> --without-http_ssi_module --without-http_upstream_ip_hash_module
> --without-http_userid_module --without-http_uwsgi_module
> --add-module=../agentzh-headers-more-nginx-module-278ba7d
> --conf-path=nginx.conf --error-log-path=/var/log/nginx/error.log
> --http-log-path=/var/log/nginx/access.log --with-debug
> I believe this might be relevant as well:
> checking for system md library ... not found
> checking for system md5 library ... not found
> checking for OpenSSL md5 crypto library ... found
> checking for zlib library ... found
> creating objs/Makefile
> Configuration summary
>   + using PCRE library: ../pcre-8.31
>   + OpenSSL library is not used
>   + md5: using system crypto library
>   + sha1 library is not used
>   + using system zlib library

So nginx is using system crypto library (aka OpenSSL's crypto 
library) and it seems to do wrong thing.  Could you please try to 
force nginx's own md5 implementation with

./configure --with-cc-opt="-DNGX_HAVE_MD5=0" ...

to see if it helps?

You may also want to produce debug log, see for details.

Maxim Dounin

More information about the nginx mailing list