[asterisk-bugs] [JIRA] (ASTERISK-26567) PJSIP session supplements are called too late

Mark Michelson (JIRA) noreply at issues.asterisk.org
Tue Nov 8 13:48:10 CST 2016


Mark Michelson created ASTERISK-26567:
-----------------------------------------

             Summary: PJSIP session supplements are called too late
                 Key: ASTERISK-26567
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26567
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_pjsip_session
    Affects Versions: 14.1.1, 13.12.1
            Reporter: Mark Michelson


res_pjsip_session calls into session supplements when the PJSIP_EVENT_TX_MSG event occurs. This happens in both inv state changes, and transaction state changes. In both cases, though, when this event occurs, it's actually too late to be trying to modify the outgoing message. This is because at this point, the message is in one of two possible states:

a) The message has already been sent
b) An asynchronous DNS query has been started, and when it completes, the message will be sent from a separate thread.

In situation b, this can be disastrous. We could be trying to modify a pjsip_tx_data at the same time that the message is being rendered into text and being sent out. This can cause memory corruption or outright crashes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list