[Home]

Summary:ASTERISK-25306: Persistent subscriptions can save multiple SIP messages at once, leading to potential crashes.
Reporter:Mark Michelson (mmichelson)Labels:
Date Opened:2015-08-06 13:07:18Date Closed:2015-08-07 05:20:18
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip_pubsub
Versions:13.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Currently, persistent subscriptions save the data read from the socket as the SIP packet. The problem is that with stream-based sockets, the data read from the socket could include multiple SIP packets. If the first of those SIP packets is a SIP response instead of a SUBSCRIBE request, then when the SUBSCRIBE request is handled, then both the response and the SUBSCRIBE are saved to persistent storage. If Asterisk is restarted, then attempting to recreate the subscription will crash since the code assumes that the recreated SIP message will be a SUBSCRIBE request, not a response.
Comments: