[asterisk-bugs] [JIRA] (ASTERISK-25893) Function vmauthenticate accesses uninitialized memory

Rusty Newton (JIRA) noreply at issues.asterisk.org
Wed Apr 6 15:30:56 CDT 2016


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

Rusty Newton commented on ASTERISK-25893:
-----------------------------------------

Thanks for the report. Do you want to provide a patch on Gerrit[1] to help get a fix in faster?

[1]: https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage



> Function vmauthenticate accesses uninitialized memory
> -----------------------------------------------------
>
>                 Key: ASTERISK-25893
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25893
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_voicemail
>    Affects Versions: 13.7.2
>            Reporter: Filip Jenicek
>
> The problem is in function vmauthenticate, on lines
> {code}
> 	if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, skipuser, 3, silent)) {
> 		pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", mailbox);
> 		pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", vmus.context);
> {code}
> If skipuser>0, then vm_authenticate does not fill the vmus variable, because of the condition:
> {code}
> 	if (vmu && !skipuser) {
> 		memcpy(res_vmu, vmu, sizeof(struct ast_vm_user));
> 	}
> {code}
> The result is that AUTH_CONTEXT is set with an uninitialized memory, following errors are logged:
> {code}
> [06/Apr/2016 04:51:12] asterisk[32621] [C-00000000]json.c:704 in ast_json_vpack: Error building JSON from '{s: s, s: s}': Invalid UTF-8 string.
> [06/Apr/2016 04:51:12] asterisk[32621] [C-00000000]stasis_channels.c:774 in ast_channel_publish_varset: Error creating message name=AUTH_CONTEXT value=ެ��
> {code}



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



More information about the asterisk-bugs mailing list