mirror of https://github.com/asterisk/asterisk
A dummy channel allocated with ast_dummy_channel_alloc() never gets a channel technology, so ast_channel_tech() returns NULL for it. func_channel_read() dereferences ast_channel_tech(chan)->type for CHANNEL(channeltype) without checking the tech for NULL, and func_channel_write_real() dereferences it the same way in its fallback branch. Both crash with a SIGSEGV on a dummy channel. This happens when CHANNEL(channeltype) is present in channelvars of ari.conf and the variable is evaluated on a dummy channel, e.g. when a voicemail is deposited for a mailbox that has an email address configured. Guard both dereferences. A dummy channel has no technology, so CHANNEL(channeltype) now reads as an empty string and a write falls through to the "Unknown or unavailable item requested" warning. This is very similar to the issue fixed by https://github.com/asterisk/asterisk/pull/1993 Resolves: #2150 AI disclaimer: Claude Opus 4.8 was used to find the cause of the crash and to find a solution. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>22
parent
5f5d1cfe22
commit
e5e265c8d9
Loading…
Reference in new issue