Opened 15 years ago

Closed 15 years ago

#959 closed defect (fixed)

Assertion upon receiving malformed SIP messages (thanks Andrey Kovalenko for the report)

Reported by: bennylp Owned by: bennylp
Priority: critical Milestone: release-1.5
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Several cases of malformed incoming SIP messages will cause assertion to be raised when it should be handled as error condition:

  1. Receiving ACK for non-INVITE UAS transaction will trigger tsx->method.id == PJSIP_INVITE_METHOD assertion in pjsip/src/pjsip/sip_transaction.c:2978. Sample output:
    Assertion failed: tsx->method.id == PJSIP_INVITE_METHOD, 
    file c:\users\benny\project\pjproject\pjsip\src\pjsip\sip_transaction.c,
    line 2978
    
  1. Receiving SIP response message with invalid status code (for example, "SIP/2.0 4") will trigger !"Unexpected event" assertion in pjsip/src/pjsip/sip_transaction.c:2808. Sample output:
    Assertion failed: !"Unexpected event", file 
    c:\users\benny\project\pjproject\pjsip\src\pjsip\sip_transaction.c,
     line 2806
    

Attachments (1)

badresp.py (908 bytes) - added by bennylp 15 years ago.
Python script to send SIP response message with malformed status code to reproduce the bug

Download all attachments as: .zip

Change History (3)

comment:1 Changed 15 years ago by bennylp

  • Component changed from applications to pjsip

Changed 15 years ago by bennylp

Python script to send SIP response message with malformed status code to reproduce the bug

comment:2 Changed 15 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r2915:

  • transaction checks for the method before processing incoming ACK request
  • transport layer checks the validity of status code in the response
  • added SIPP scenario to reproduce the bad ACK request
Note: See TracTickets for help on using tickets.