Skip to content

[CRASH] rest_client TLS crash  #1905

@bcnewlin

Description

@bcnewlin

OpenSIPS version you are running

version: opensips 2.4.6 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, QM_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: aa89b8764
main.c compiled on 00:37:59 Nov 23 2019 with gcc 7

Crash Core Dump

https://pastebin.com/LKt2KRkg

Describe the traffic that generated the bug

Crash is caused when running async REST calls using HTTPS on an OpenSIPS that also has tls_mgm loaded. Crashes were not observed on instances making async REST HTTPS calls without tls_mgm. We plan to test with synchronous REST calls to determine if the asynchronicity (sp?) is related.

To Reproduce

  1. Start OpenSIPS with rest_client and tls_mgm loaded.
  2. Start traffic that utilizes and async REST call during processing
  3. OpenSIPS crashes

Relevant System Logs

Nov 25 14:19:00 [2751] WARNING:core:tcpconn_add_alias: possible port hijack attempt
Nov 25 14:19:00 [2751] WARNING:core:tcpconn_add_alias: alias already present and points to another connection (1488095225 : 5060 and 1488095257 : 5060)
Nov 25 14:19:00 [2751] WARNING:core:do_action: tcp alias failed
Nov 25 14:19:00 [2749] ERROR:rest_client:resume_async_http_req: connected, but transfer timed out (5s)
...
Nov 25 14:19:03 [2736] CRITICAL:core:qm_free: freeing already freed pointer, first free: tls.h: os_free(119) - aborting

OS/environment information

  • Operating System: Amazon Linux 2
  • OpenSIPS installation: git
  • other relevant information:

Additional context

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions