[asterisk-bugs] [JIRA] (ASTERISK-29376) res_rtp_asterisk: Coredump with t.140 RED enabled

Thomas Johnson (JIRA) noreply at issues.asterisk.org
Thu Jun 3 11:16:09 CDT 2021


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

Thomas Johnson commented on ASTERISK-29376:
-------------------------------------------

After looking at that last full log and the code, I have the following workaround:
static int red_write(const void *data)
{
/* do not reschedule if the pointers were NULL */
	int ret=1;
	struct ast_rtp_instance *instance = (struct ast_rtp_instance*) data;
	struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
	ao2_lock(instance);
	if (rtp) {
		if (rtp->red) {
			if (rtp->red->t140.datalen > 0) {
				ast_rtp_write(instance, &rtp->red->t140);
			}
		} else {
			ret=0;
		}
	} else {
		ret=0;
	}
	ao2_unlock(instance);
	
	return ret;
}

I don't consider this the proper fix to submit it.  So, please continue to provide comments when possible.


> res_rtp_asterisk: Coredump with t.140 RED enabled
> -------------------------------------------------
>
>                 Key: ASTERISK-29376
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29376
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_rtp_asterisk
>    Affects Versions: 17.8.1
>         Environment: RedHat 8
>            Reporter: Thomas Johnson
>            Assignee: Unassigned
>         Attachments: core.asterisk.2431.ipswitchdev66.microautomation.local.1617722782-brief.txt, core.asterisk.2431.ipswitchdev66.microautomation.local.1617722782-full.txt, core.asterisk.2431.ipswitchdev66.microautomation.local.1617722782-info.txt, core.asterisk.2431.ipswitchdev66.microautomation.local.1617722782-locks.txt, core.asterisk.2431.ipswitchdev66.microautomation.local.1617722782-thread1.txt, core.asterisk.296402.ipswitchdev66.microautomation.local.1622643818-brief.txt, debug_log_123456.gz, full, temp.zip
>
>
> Asterisk will randomly coredump if RED is allowed.  The exception is in an apparent scheduled callback to red_write.   I tried modifying the function to check for NULL pointers, but it still crashes due to possibly an invalid pointer.



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



More information about the asterisk-bugs mailing list