[Varnish] #763: problem with invalid Headers

Varnish varnish-bugs at varnish-cache.org
Wed Aug 25 04:37:42 CEST 2010


#763: problem with invalid Headers
---------------------------+------------------------------------------------
 Reporter:  danielpicolli  |       Owner:  phk                
     Type:  defect         |      Status:  new                
 Priority:  high           |   Milestone:  Varnish 2.1 release
Component:  varnishd       |     Version:  trunk              
 Severity:  major          |    Keywords:                     
---------------------------+------------------------------------------------
 hello!

 I found a little mistake in on cache_vary.c that caused a huge crash on
 varnish. We have 10 dual quad-core servers using varnish with about 14
 backends, one of these backends has been configured with wrong Vary
 header, something like " Vary:: Accept-Encoding", yes, with two ":",
 someone set it wrong and all of the varnish servers crashed. :-)

 The problem can be reproduced with nginx as backend:

 add_header Vary: Accept-Encoding;

 (i know, this is a mistake, but mistakes happen in production) :-)

 On the first request for the wrong object, varnish crashed.

 Analyzing the cache_vary.c, i found the code that causing this problem:

 line 123 of cache_vary.c

  xxxassert(*q == ',');

 i thought this patch attached would fix the problem, i did many tests, and
 had good results.

 I would like to know your opinion.

 ps: attached patch and strace.

 Regards,
 Daniel Biazus

-- 
Ticket URL: <http://varnish-cache.org/ticket/763>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list