[asterisk-bugs] [JIRA] (ASTERISK-28900) Memory corruption and deadlock in frame.c when gatewaying between non-T.38 and T.38 endpoints

Gregory Massel (JIRA) noreply at issues.asterisk.org
Sat May 16 08:20:25 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250797#comment-250797 ] 

Gregory Massel commented on ASTERISK-28900:
-------------------------------------------

Some further notes:
1. Although the calls in the PCAP were G.729a codec from the Yeastar device, the issue wasn't with transcoding G.729 because this issue does NOT occur if I make a test call from a regular voice handset to the same destination number, irrespective of whether the handset is set to use G.729 or G.711 A-law.
2. I have identified six originating sources so far that have caused this issue and each and every one involved a Yeastar switchboard. I've tried to replicate it with other hardware and no other hardware seems to trigger the issue. 
3. Unfortunately I don't have a Yeastar device of my own to test with, however, I have customers using these. I am arranging for one to upgrade the Yeastar firmware to the very latest and will re-test to see if there has been any fix on their side.
4. The backtrace seems to indicate a memory corruption when dealing with the RTP frame.
5. It is important to fix this from the Asterisk side because, if the source of the issue is weaponised, it could create a security risk.

> Memory corruption and deadlock in frame.c when gatewaying between non-T.38 and T.38 endpoints
> ---------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28900
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28900
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Bridging
>    Affects Versions: 16.10.0
>         Environment: Ubuntu 18.04.4 LTS, Asterisk 16.10.0, kernels 5.0.0-29-generic and 5.0.0-37-generic, Intel E5-1680 and E3-1271. No DAHDI.
>            Reporter: Gregory Massel
>         Attachments: 2020-05-12 Call that crashed Asterisk - client leg.pcap, 2020-05-12 Call that crashed Asterisk - SBC leg.pcap, 2020-05-13 Call that crashed Asterisk - client leg.pcapng, 2020-05-13 Call that crashed Asterisk - SBC leg.pcapng, core-brief.txt, core-brief.txt, core-full.txt, core-full.txt, core-info.txt, core-info.txt, core-locks.txt, core-locks.txt, core-thread1.txt, core-thread1.txt
>
>
> When the T.38 gateway is enabled on two PJSIP endpoints [ set_var=FAXOPT(gateway)=yes,15 ] and the called endpoint initiates a T.38 re-INVITE and the calling endpoint does NOT support T.38, Asterisk tries to gateway between the audio (RTP) and UDPTL (T.38). In most instances, this works fine. However, when the calling party involves a Yeastar PBX device, the call will - every time, repeatedly - cause the Asterisk box performing the T.38 gatewaying to immediately deadlock and, shortly thereafter, Asterisk core dumps. 
> At present this is only happening if the calling device is a Yeastar PBX which seems to indicate that a corrupt, malformed or missing RTP frame generated by that device is what is crashing Asterisk.
> In many instances the core dump is zero bytes or the backtrace is largely unusable, however, I have managed to extract a few usable backtraces as well as packet captures of the calls that tigger the crash.



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



More information about the asterisk-bugs mailing list