[sr-dev] [tracker] Comment added: textopsx:msg_apply_changes() can corrupt incoming TCP message buffer (Attachment added)

sip-router admin at sip-router.org
Fri Dec 2 11:48:29 CET 2011


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#185 - textopsx:msg_apply_changes() can corrupt incoming TCP message buffer
User who did this - Daniel-Constantin Mierla (miconda)

----------
I was thinking to a similar approach, but linking msg->buf to a buffer stored in textops.

There are couple of aspects that needed to be checked, that's why I haven't gone for it yet. Pretty much any time sip_msg_t structure is changed, TM module needs to be updated as it does cloning of the structure in shared memory.

Your patch should at least reset the tmp_buf field for the shared memory clone to be sure nobody will access it from different process or after was freed.

I am attaching a variant of the patch I thought of. I am considering also adding an internal flag to mark that the buffer was changed. The patch will keep the new buffer longer, till the next msg_apply_changes() -- it can be improved with a pre-script callback or checking the internal flag. The advantage is no need to change the sip_msg_t structure and check tm cloning.
----------

One or more files have been attached.

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=185#comment448

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list