mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-12 09:37:24 -07:00
e8e8042d54
The filter_on_tx_message() function was using pj_strassign() to save the pointer of the pjproject transport local address to a local pj_str_t variable. That variable was ultimately used to set the Contact header's uri->host and the SDP connection attribute's address again using pj_strassign. pj_strassign() doesn't copy the actual value of the pj_str_t however, it just copies the pointer so if a connection-oriented transport is disconnected before the 200 OK with the SDP is sent, those pointers will be invalid which can cause use-after-free issues. To prevent this, filter_on_tx_message() now uses pj_strdup with the tdata->pool as the backing store to save the local IP address to the local variable. pj_strassign() can then be used safely later on since the tdata will be available for the life of the transaction. Resolves: #GHSA-g8q2-p36q-94f6