[OpenSIPS-Devel] [OpenSIPS/opensips] 5e1f96: tm: dup in pkg the faked msg headers

Răzvan Crainea noreply at github.com
Mon Sep 30 09:36:33 EDT 2019

  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 5e1f96a9176c4ba915ecd4863c65998b6bcfaebc
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M modules/tm/t_msgbuilder.h
    M parser/msg_parser.c
    M parser/msg_parser.h

  Log Message:
  tm: dup in pkg the faked msg headers

before this commit, the faked reqests were having the headers fields
stored in shm_mem and shared with the tm request uas. Thus, during
concurrent accesses to one of the headers' `parsed` field, the first
process would have parsed the field in pkg memory, and the second
process would have found that header already parsed. However, it
couldn't read the other's process memory, resulting in an invalid
Moving the headers in a private area for the faked request solves this
issue, as each process will have its own `parsed` field in pkg memory.

Credits go to Rizwan Syed and Jonathan Hulme from Connex CS for
reporting and supporting the testing and fixing of this issue.

This issue has also been reported in ticket #1808

(cherry picked from commit a48aeca2d29f0ae04f3393ddb32bcf70b2be2795)

More information about the Devel mailing list