Asterisk
  1. Asterisk
  2. ASTERISK-11633

EXTEN gets printf-transformed when written to the logs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: General
    • Labels:
      None
    • SVN Revision Number:
      74812
    • Mantis ID:
      12205
    • Regression:
      No

      Description

      > [Mar 13 16:42:46] VERBOSE[14099] logger.c: [Mar 13 16:42:46] – Executing [cIAX20.000000ctelpbx-10.0000005160@from-peer-voipconnect-internal:1] Set("IAX2/voipconnect_j1-24", "ds=IAX2/ctelpbx-1/5160") in new
      stack

      What is that crazy extension number? It should say cIAX2%2fctelpbx-1%2f5160 (which, I admit, is pretty odd too - its a URIENCODE()d channel address).

      Looks like the log messages gets used as the "format" side of another printf, or something like that, and the %2f gets taken as a float format specifier.

      Steve

        Activity

        Hide
        Russell Bryant added a comment -

        Thanks for the report. This is actually a security vulnerability. Luckily, it only affects trunk ...

        You just have to change

        ast_log(LOG_VERBOSE, logmsg->str);

        to
        ast_log(LOG_VERBOSE, "%s", logmsg->str);

        in ast_verbose() in main/logger.c.

        Show
        Russell Bryant added a comment - Thanks for the report. This is actually a security vulnerability. Luckily, it only affects trunk ... You just have to change ast_log(LOG_VERBOSE, logmsg->str); to ast_log(LOG_VERBOSE, "%s", logmsg->str); in ast_verbose() in main/logger.c.
        Hide
        Joshua Colp added a comment -

        Fixed in trunk as of revision 109396 and 1.6.0 as of revision 109398.

        Show
        Joshua Colp added a comment - Fixed in trunk as of revision 109396 and 1.6.0 as of revision 109398.

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development