[asterisk-bugs] [JIRA] (ASTERISK-29231) pjsip: SIGSEGV in CLI if no trunk is registered

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Oct 13 06:13:52 CDT 2021


     [ https://issues.asterisk.org/jira/browse/ASTERISK-29231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-29231:
-------------------------------------

    Target Release Version/s: 19.0.0

> pjsip: SIGSEGV in CLI if no trunk is registered
> -----------------------------------------------
>
>                 Key: ASTERISK-29231
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29231
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_outbound_registration
>    Affects Versions: 18.1.0
>         Environment: CentOS 7 x86_64
>            Reporter: Michael Maier
>            Assignee: George Joseph
>            Severity: Major
>      Target Release: 16.16.0, 18.2.0, 19.0.0
>
>
> Asterisk segfaults on CLI if the following command is entered and no registration exists:
> pjsip show registrations all
> Backtrace:
> {code}
> Thread 1 (Thread 0x7ff44c816700 (LWP 2437)):
> #0  0x00007ff48619b1c0 in cli_print_body (obj=0x3761b78, arg=0x7ff44c815200, flags=2) at res_pjsip_outbound_registration.c:2297
>         registration = 0x3761b78
>         context = 0x7ff44c815200
>         id = 0x376c3f0 "easybellPJSIP"
>         state = 0x0
>         next_run_ms = 0
>         next = {tv_sec = 0, tv_usec = 0}
>         last = {tv_sec = 0, tv_usec = 0}
>         tm = {tm_sec = 0, tm_min = 0, tm_hour = -2147479896, tm_mday = 32755, tm_mon = 1283542976, tm_year = 32756, tm_wday = 0, tm_yday = 0, tm_isdst = 512000, tm_gmtoff = 0, tm_zone = 0x100000002 <Address 0x100000002 out of bounds>, tm_usec = -2147479808}
>         next_start = '000' <repeats 31 times>
>         last_start = '000' <repeats 31 times>
>         interval = 32755
>         __PRETTY_FUNCTION__ = "cli_print_body"
> {code}
> res_pjsip_outbound_registration.c:2297 is:
> if (state->client_state->sched_task) {
> How to reproduce:
> {code}
> virtast*CLI> pjsip show registrations
>  <Registration/ServerURI..............................>  <Auth..........>  <Status.......>  <Last Reg..>  <Intvl>  <Next Start.....secs>
> ========================================================================================================================================
>  easybellPJSIP/sip:secure.sip.easybell.de                easybellPJSIP     Registered       Sun 09:29:33       80  Sun 09:30:53       58
> Objects found: 1
> [2021-01-03 09:29:57] DEBUG[2397]: res_pjsip_registrar.c:1293 check_expiration_thread: Expiring 0 contacts
> virtast*CLI> pjsip send unregister *all
> Unregister all queued
> [2021-01-03 09:30:02] DEBUG[2437]: res_pjsip_outbound_registration.c:1263 sip_outbound_registration_state_destroy: easybellPJSIP: Destroying registration state for registration to server 'sip:secure.sip.easybell.de' from client 'sip:004912345678901 at secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:776 handle_client_state_destruction: easybellPJSIP: Trying to unregister with server 'sip:secure.sip.easybell.de' from client 'sip:004912345678901 at secure.sip.easybell.de' before destruction.
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:479 sip_resolve: Performing SIP DNS resolution of target 'secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:506 sip_resolve: Transport type for target 'secure.sip.easybell.de' is 'TLS transport'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:549 sip_resolve: [0x7ff444300d58] Created resolution tracking for target 'secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7ff444300d58] Added target 'secure.sip.easybell.de' with record type '35', transport 'TLS transport', and port '5061'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7ff444300d58] Added target '_sips._tcp.secure.sip.easybell.de' with record type '33', transport 'TLS transport', and port '5061'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7ff444300d58] Added target 'secure.sip.easybell.de' with record type '1', transport 'TLS transport', and port '5061'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:620 sip_resolve: [0x7ff444300d58] Starting initial resolution using parallel queries for target 'secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2396]: res_pjsip/pjsip_resolver.c:277 sip_resolve_callback: [0x7ff444300d58] All parallel queries completed
> [2021-01-03 09:30:02] DEBUG[2396]: res_pjsip/pjsip_resolver.c:326 sip_resolve_callback: [0x7ff444300d58] A record received on target 'secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2396]: res_pjsip/pjsip_resolver.c:421 sip_resolve_callback: [0x7ff444300d58] Resolution completed - 1 viable targets
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:201 sip_resolve_invoke_user_callback: [0x7ff444300d58] Address '0' is 212.172.58.207:5061 with transport 'TLS transport'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_resolver.c:207 sip_resolve_invoke_user_callback: [0x7ff444300d58] Invoking user callback with '1' addresses
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:520 distributor: No dialog serializer for Response msg 401/REGISTER/cseq=18419 (rdata0x7ff4442ef028).  Using request transaction as basis.
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:128 find_request_serializer: Found transaction tsx0x7ff444322128 for Response msg 401/REGISTER/cseq=18419 (rdata0x7ff4442ef028).
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:138 find_request_serializer: Found serializer pjsip/outreg/easybellPJSIP-00000063 on transaction tsx0x7ff444322128
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1214 sip_outbound_registration_response_cb: easybellPJSIP: Received REGISTER response 401(Unauthorized) from 'sip:secure.sip.easybell.de': Expires: 0
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1039 handle_registration_response: easybellPJSIP: Processing REGISTER response 401 from server 'sip:secure.sip.easybell.de' for client 'sip:004912345678901 at secure.sip.easybell.de' with expiration '0'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1063 handle_registration_response: easybellPJSIP: Sending authenticated REGISTER to server 'sip:secure.sip.easybell.de' from client 'sip:004912345678901 at secure.sip.easybell.de'
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:520 distributor: No dialog serializer for Response msg 200/REGISTER/cseq=18420 (rdata0x7ff4442ef028).  Using request transaction as basis.
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:128 find_request_serializer: Found transaction tsx0x7ff44400ada8 for Response msg 200/REGISTER/cseq=18420 (rdata0x7ff4442ef028).
> [2021-01-03 09:30:02] DEBUG[2385]: res_pjsip/pjsip_distributor.c:138 find_request_serializer: Found serializer pjsip/outreg/easybellPJSIP-00000063 on transaction tsx0x7ff44400ada8
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1214 sip_outbound_registration_response_cb: easybellPJSIP: Received REGISTER response 200(OK) from 'sip:secure.sip.easybell.de': Expires: 0
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1039 handle_registration_response: easybellPJSIP: Processing REGISTER response 200 from server 'sip:secure.sip.easybell.de' for client 'sip:004912345678901 at secure.sip.easybell.de' with expiration '0'
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1110 handle_registration_response: easybellPJSIP: Outbound unregistration to 'sip:secure.sip.easybell.de' with client 'sip:004912345678901 at secure.sip.easybell.de' successful
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip/pjsip_transport_events.c:246 transport_monitor_unregister_cb: Unregistered monitor 0x7ff486196129(0x7ff444006188) from transport tlsc0x7ff4442eed38
> [2021-01-03 09:30:02] DEBUG[2386]: res_pjsip_outbound_registration.c:1284 sip_outbound_registration_client_state_destroy: easybellPJSIP: Destroying registration client state
> virtast*CLI> pjsip show registrations
> virtast*CLI> 
> Disconnected from Asterisk server
> Asterisk cleanly ending (0).
> Executing last minute cleanups
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list