-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                              ESB-2010.0180.2
              A vulnerability has been identified in Asterisk
                             24 February 2010

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           Asterisk Open Source 1.2.x
                   Asterisk Open Source 1.4.x
                   Asterisk Open Source 1.6.x
                   Asterisk Business Edition B.x.x
                   Asterisk Business Edition C.x.x
Publisher:         Asterisk
Operating System:  UNIX variants (UNIX, Linux, OSX)
Impact/Access:     Modify Arbitrary Files -- Remote with User Interaction
Resolution:        Mitigation
CVE Names:         CVE-2010-0685  

Original Bulletin: 
   http://downloads.digium.com/pub/security/AST-2010-002.html

Revision History:  February 24 2010: CVE Reference added
                   February 22 2010: Initial Release

- --------------------------BEGIN INCLUDED TEXT--------------------

               Asterisk Project Security Advisory - AST-2010-002

   +------------------------------------------------------------------------+
   |       Product        | Asterisk                                        |
   |----------------------+-------------------------------------------------|
   |       Summary        | Dialplan injection vulnerability                |
   |----------------------+-------------------------------------------------|
   |  Nature of Advisory  | Data injection vulnerability                    |
   |----------------------+-------------------------------------------------|
   |    Susceptibility    | Remote Unauthenticated Sessions                 |
   |----------------------+-------------------------------------------------|
   |       Severity       | Critical                                        |
   |----------------------+-------------------------------------------------|
   |    Exploits Known    | Yes                                             |
   |----------------------+-------------------------------------------------|
   |     Reported On      | 10/02/10                                        |
   |----------------------+-------------------------------------------------|
   |     Reported By      | Hans Petter Selasky                             |
   |----------------------+-------------------------------------------------|
   |      Posted On       | 16/02/10                                        |
   |----------------------+-------------------------------------------------|
   |   Last Updated On    | February 18, 2010                               |
   |----------------------+-------------------------------------------------|
   |   Advisory Contact   | Leif Madsen < lmadsen AT digium DOT com >       |
   |----------------------+-------------------------------------------------|
   |       CVE Name       |                                                 |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   | Description | A common usage of the ${EXTEN} channel variable in a     |
   |             | dialplan with wildcard pattern matches can lead to a     |
   |             | possible string injection vulnerability. By having a     |
   |             | wildcard match in a dialplan, it is possible to allow    |
   |             | unintended calls to be executed, such as in this         |
   |             | example:                                                 |
   |             |                                                          |
   |             | exten => _X.,1,Dial(SIP/${EXTEN})                        |
   |             |                                                          |
   |             | If you have a channel technology which can accept        |
   |             | characters other than numbers and letters (such as SIP)  |
   |             | it may be possible to craft an INVITE which sends data   |
   |             | such as 300&Zap/g1/4165551212 which would create an      |
   |             | additional outgoing channel leg that was not originally  |
   |             | intentioned by the dialplan programmer.                  |
   |             |                                                          |
   |             | Usage of the wildcard character is common in dialplans   |
   |             | that require variable number length, such as European    |
   |             | dial strings.                                            |
   |             |                                                          |
   |             | Please note that this is not limited to an specific      |
   |             | protocol or the Dial() application.                      |
   |             |                                                          |
   |             | The expansion of variables into                          |
   |             | programmatically-interpreted strings is a common         |
   |             | behavior in many script or script-like languages,        |
   |             | Asterisk included. The ability for a variable to         |
   |             | directly replace components of a command is a feature,   |
   |             | not a bug - that is the entire point of string           |
   |             | expansion.                                               |
   |             |                                                          |
   |             | However, it is often the case due to expediency or       |
   |             | design misunderstanding that a developer will not        |
   |             | examine and filter string data from external sources     |
   |             | before passing it into potentially harmful areas of      |
   |             | their dialplan. With the flexibility of the design of    |
   |             | Asterisk come these risks if the dialplan designer is    |
   |             | not suitably                                             |
   |             | cautious as to how foreign data is allowed to continue   |
   |             | into the system.                                         |
   |             |                                                          |
   |             | This security release is intended to raise awareness of  |
   |             | how it is possible to insert malicious strings into      |
   |             | dialplans, and to advise developers to read the best     |
   |             | practices documents so that they may easily avoid these  |
   |             | dangers.                                                 |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   | Resolution | One resolution is to wrap the ${EXTEN} channel variable   |
   |            | with the FILTER() dialplan function to only accept        |
   |            | characters which are expected by the dialplan programmer. |
   |            | The recommendation is for this to be the first priority   |
   |            | in all contexts defined as incoming contexts in the       |
   |            | channel driver configuration files.                       |
   |            |                                                           |
   |            | Examples of this and other best practices can be found in |
   |            | the new README-SERIOUSLY.bestpractices.txt document in    |
   |            | the top level folder of your Asterisk sources.            |
   |            |                                                           |
   |            | Asterisk 1.2.40 has also been released with a backport of |
   |            | the FILTER() dialplan function from 1.4 in order to       |
   |            | provide the tools required to resolve this issue in your  |
   |            | dialplan.                                                 |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   |                           Affected Versions                            |
   |------------------------------------------------------------------------|
   |           Product            | Release Series |                        |
   |------------------------------+----------------+------------------------|
   |     Asterisk Open Source     |     1.2.x      | All versions           |
   |------------------------------+----------------+------------------------|
   |     Asterisk Open Source     |     1.4.x      | All versions           |
   |------------------------------+----------------+------------------------|
   |     Asterisk Open Source     |     1.6.x      | All versions           |
   |------------------------------+----------------+------------------------|
   |  Asterisk Business Edition   |     B.x.x      | All versions           |
   |------------------------------+----------------+------------------------|
   |  Asterisk Business Edition   |     C.x.x      | All versions           |
   |------------------------------+----------------+------------------------|
   |          Switchvox           |      None      | No versions affected   |
   +------------------------------------------------------------------------+

+---------------------------------------------------------------------------------------------+
|                                          Document                                           |
|---------------------------------------------------------------------------------------------|
|                                       SVN URL                                        |Branch|
|--------------------------------------------------------------------------------------+------|
|http://svn.asterisk.org/svn/asterisk/branches/1.2/README-SERIOUSLY.bestpractices.txt  |v1.2  |
|--------------------------------------------------------------------------------------+------|
|http://svn.asterisk.org/svn/asterisk/branches/1.4/README-SERIOUSLY.bestpractices.txt  |v1.4  |
|--------------------------------------------------------------------------------------+------|
|http://svn.asterisk.org/svn/asterisk/branches/1.6.0/README-SERIOUSLY.bestpractices.txt|v1.6.0|
|--------------------------------------------------------------------------------------+------|
|http://svn.asterisk.org/svn/asterisk/branches/1.6.1/README-SERIOUSLY.bestpractices.txt|v1.6.1|
|--------------------------------------------------------------------------------------+------|
|http://svn.asterisk.org/svn/asterisk/branches/1.6.2/README-SERIOUSLY.bestpractices.txt|v1.6.2|
+---------------------------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   |                              Corrected In                              |
   |------------------------------------------------------------------------|
   |                 Product                  |           Release           |
   |------------------------------------------+-----------------------------|
   |           Open Source Asterisk           |           1.2.40            |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   |     Links      | https://issues.asterisk.org/view.php?id=16810         |
   |                |                                                       |
   |                | https://issues.asterisk.org/view.php?id=16808         |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   | Asterisk Project Security Advisories are posted at                     |
   | http://www.asterisk.org/security                                       |
   |                                                                        |
   | This document may be superseded by later versions; if so, the latest   |
   | version will be posted at                                              |
   | http://downloads.digium.com/pub/security/AST-2010-002.pdf and          |
   | http://downloads.digium.com/pub/security/AST-2010-002.html             |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   |                            Revision History                            |
   |------------------------------------------------------------------------|
   |      Date       |       Editor       |         Revisions Made          |
   |-----------------+--------------------+---------------------------------|
   | 16/02/10        | Leif Madsen        | Initial release                 |
   +------------------------------------------------------------------------+

               Asterisk Project Security Advisory - AST-2010-002
              Copyright (c) 2010 Digium, Inc. All Rights Reserved.
  Permission is hereby granted to distribute and publish this advisory in its
                           original, unaltered form.

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iD8DBQFLhKlG/iFOrG6YcBERAqKVAJ9LFAU6U6dtxULw8QeQV2XjmHOngQCgrPXU
RXyJGkgmbNmuPmA4qT4U3oE=
=KBsB
-----END PGP SIGNATURE-----