[OpenSIPS-Devel] [OpenSIPS/opensips] af86cf: b2b_logic: don't crash when searching inexistent t...

Vlad Pătrașcu noreply at github.com
Tue Jul 4 14:46:51 UTC 2023


  Branch: refs/heads/3.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: af86cf6d9e5a25a07d7d564fb9779a0e0130e346
      https://github.com/OpenSIPS/opensips/commit/af86cf6d9e5a25a07d7d564fb9779a0e0130e346
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M modules/b2b_logic/b2b_logic_ctx.c

  Log Message:
  -----------
  b2b_logic: don't crash when searching inexistent tuple by key

Searching the current tuple by key for accessing the logic context
should not cause a crash. As the hash is not locked or the structure
ref counted, there is a distinct possibility that the tuple cannot
be found anymore.

Related to #3117

(cherry picked from commit d05d408b0bf2346769d580d04b413f7d4a277e13)


  Commit: b6408c9d1fcefc2783628eba65fccea3bd770444
      https://github.com/OpenSIPS/opensips/commit/b6408c9d1fcefc2783628eba65fccea3bd770444
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M modules/b2b_logic/b2b_logic.c
    M modules/b2b_logic/b2b_logic_ctx.c
    M modules/b2b_logic/records.c

  Log Message:
  -----------
  b2b_logic: fix some locking issues

Properly access the b2b logic context of the current tuple under lock.
Also, protect the access to the tuple when using the b2bl_get_entity_info()
API function.

Related to #3117

(cherry picked from commit ebf40c91f9d62f367cddd722f05a1b53b6d30b6a)


  Commit: ea2f617933a8d4a7bc4ad7a49c3064fdce5bd6bb
      https://github.com/OpenSIPS/opensips/commit/ea2f617933a8d4a7bc4ad7a49c3064fdce5bd6bb
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M modules/b2b_logic/logic.c

  Log Message:
  -----------
  b2b_logic: properly reset the current tuple in all cases

The global variable used to identify the current tuple in the local_route was
not properly reset in all cases (when retrying a birdge action for example).
This could lead to a failure to identify the current tuple when acessing
the $b2b_logic variables, the b2b logic context etc., even when we're
not in the context of a local_route.

(cherry picked from commit 92772e69f36dcc70b2418374d83bf3274b13f104)


Compare: https://github.com/OpenSIPS/opensips/compare/0f5a3897d9d6...ea2f617933a8



More information about the Devel mailing list