[OpenSER-Users] Massive "ERROR: bad header field" lead to crashing of OpenSER 1.2.X ?

David Loh davidloh at vyke.com
Thu Feb 21 05:24:11 CET 2008


Hi all,

Recently my OpenSER log showed a lot of these error,
------------------------------------------------------------------------
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:parse_content_length: 
parse ERROR near char [0][
Feb 20 22:14:47 ser ]
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:get_hdr_field: bad 
content_length header
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR: bad header field
Feb 20 22:14:47 sip /sbin/openser[3607]: find_first_route: ERROR while 
parsing headers
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:parse_content_length: 
parse ERROR near char [0][
Feb 20 22:14:47 ser ]
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:get_hdr_field: bad 
content_length header
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR: bad header field
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR: 
build_res_buf_from_sip_req: alas, parse_headers failed
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:parse_content_length: 
parse ERROR near char [0][
Feb 20 22:14:47 ser ]
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR:get_hdr_field: bad 
content_length header
Feb 20 22:14:47 sip /sbin/openser[3607]: ERROR: bad header field
Feb 20 22:14:47 sip /sbin/openser[3607]: find_credentials(): ERROR while 
parsing headers
Feb 20 22:14:47 sip /sbin/openser[3607]: pre_auth(): ERROR while looking 
for credentials
Feb 20 22:14:47 sip /sbin/openser[3605]: ERROR:parse_content_length: 
parse ERROR near char [0][
------------------------------------------------------------------------
from our past experiences, those error are most likely come from 
corrupted devices (or device/soft phone that send malformed/non-standard 
message to our SIP port).
If we're continuously having this kind of errors for hours (at a rate of 
few thousands per hour),
eventually OpenSER will not accepting new connection (REGISTER) and may 
just crash.

Wondering if there's anything we can do on OpenSER to prevent this from 
happening?


Thanks,
David Loh






More information about the Users mailing list