[asterisk-bugs] [JIRA] (ASTERISK-29934) func_channels: Invalid memory management in CHANNELS can cause a crash
N A (JIRA)
noreply at issues.asterisk.org
Wed Feb 23 11:39:07 CST 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-29934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258139#comment-258139 ]
N A commented on ASTERISK-29934:
--------------------------------
> You've marked this as "One Time" but in your comment
I marked it as "one time" because I've only experienced it once. Presumably it could happen again, but it doesn't happen every time. I said occasionally as I doubt a bug really would only occur "one time", given enough time.
> The line numbers in the attached backtrace do not match
It's 18.9.0, but the file is slightly different as mine also has the TECH_EXISTS function in the file, and the XML docs for that at the top push everything else down a bit.
Line 729 on my system corresponds to the regcomp line at the bottom here, which aligns with what the backtrace contains:
```
static int func_channels_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t maxlen)
{
struct ast_channel *c = NULL;
regex_t re;
int res;
size_t buflen = 0;
struct ast_channel_iterator *iter;
buf[0] = '\0';
if (!ast_strlen_zero(data)) {
if ((res = regcomp(&re, data, REG_EXTENDED | REG_ICASE | REG_NOSUB))) {
```
> func_channels: Invalid memory management in CHANNELS can cause a crash
> ----------------------------------------------------------------------
>
> Key: ASTERISK-29934
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29934
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Functions/func_channel
> Affects Versions: 18.9.0
> Environment: Debian 10
> Reporter: N A
> Assignee: N A
> Attachments: backtrace.txt
>
>
> Reading the CHANNELS function can cause Asterisk to crash.
> However, I can't replicate this again on the same system so it appears to only happen occasionally.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list