[asterisk-bugs] [JIRA] (ASTERISK-28569) Missing check for variable buf in function config_text_file_load in utils/extconf.c

Benjamin Keith Ford (JIRA) noreply at issues.asterisk.org
Tue Oct 8 08:11:47 CDT 2019


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Keith Ford updated ASTERISK-28569:
-------------------------------------------

    Assignee: Yoooooo Ha  (was: Unassigned)
      Status: Waiting for Feedback  (was: Triage)

Is this something you would like to work on? You can submit a patch to Gerrit [1] for review. More information on how to do this can be found here [2].

[1]: https://gerrit.asterisk.org/q/status:open
[2]: https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

> Missing check for variable buf in function config_text_file_load in utils/extconf.c
> -----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28569
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28569
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: . I did not set the category correctly.
>    Affects Versions: 16.6.0
>         Environment: No
>            Reporter: Yoooooo Ha
>            Assignee: Yoooooo Ha
>
> Summary: Missing check for variable buf in while(!feof(f)) loop. The 
> vulnerability may lead to DoS.
> {code}
>                  while(!feof(f)) {
>                          lineno++;
>                          if (fgets(buf, sizeof(buf), f)) {
>                                  //MISSING CHECK HERE!!
>                                  if ( withcomments ) {
>                                          CB_ADD(lline_buffer); /* add the current lline buffer to the comment buffer */
>                                          lline_buffer[0] = 0; /* erase the lline buffer */
>                                  }
>                                  new_buf = buf;
>                                  if (comment)
>                                          process_buf = NULL;
>                                  else
>                                          process_buf = buf;
>                                  while ((comment_p = strchr(new_buf, COMMENT_META))) {
> {code}
> The function may skip lines that too long.
> It is the vulnerability that is same as vulnerability that was fixed in 
> https://issues.asterisk.org/jira/secure/attachment/45489/issueA20658_dont_process_overlong_config_lines.patch 
> (ASTERISK-20658 )



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



More information about the asterisk-bugs mailing list