Skip to content
Snippets Groups Projects
  1. Dec 13, 2017
  2. Dec 01, 2017
  3. Nov 18, 2017
  4. Aug 30, 2017
    • Corey Farrell's avatar
      AST-2017-006: Fix app_minivm application MinivmNotify command injection · 1bf3dfff
      Corey Farrell authored
      An admin can configure app_minivm with an externnotify program to be run
      when a voicemail is received.  The app_minivm application MinivmNotify
      uses ast_safe_system() for this purpose which is vulnerable to command
      injection since the Caller-ID name and number values given to externnotify
      can come from an external untrusted source.
      
      * Add ast_safe_execvp() function.  This gives modules the ability to run
      external commands with greater safety compared to ast_safe_system().
      Specifically when some parameters are filled by untrusted sources the new
      function does not allow malicious input to break argument encoding.  This
      may be of particular concern where CALLERID(name) or CALLERID(num) may be
      used as a parameter to a script run by ast_safe_system() which could
      potentially allow arbitrary command execution.
      
      * Changed app_minivm.c:run_externnotify() to use the new ast_safe_execvp()
      instead of ast_safe_system() to avoid command injection.
      
      * Document code injection potential from untrusted data sources for other
      shell commands that are under user control.
      
      ASTERISK-27103
      
      Change-Id: I7552472247a84cde24e1358aaf64af160107aef1
      1bf3dfff
  5. Aug 22, 2015
  6. Dec 16, 2013
  7. Aug 30, 2012
    • Matthew Jordan's avatar
      AST-2012-012: Resolve AMI User Unauthorized Shell Access through ExternalIVR · d624f2c5
      Matthew Jordan authored
      The AMI Originate action can allow a remote user to specify information that can
      be used to execute shell commands on the system hosting Asterisk. This can
      result in an unwanted escalation of permissions, as the Originate action, which    
      requires the "originate" class authorization, can be used to perform actions
      that would typically require the "system" class authorization. Previous attempts
      to prevent this permission escalation (AST-2011-006, AST-2012-004) have sought
      to do so by inspecting the names of applications and functions passed in with
      the Originate action and, if those applications/functions matched a predefined
      set of values, rejecting the command if the user lacked the "system" class
      authorization. As noted by IBM X-Force Research, the "ExternalIVR"
      application is not listed in the predefined set of values. The solution for     
      this particular vulnerability is to include the "ExternalIVR" application in the
      set of defined applications/functions that require "system" class authorization.             
                
      Unfortunately, the approach of inspecting fields in the Originate action against
      known applications/functions has a significant flaw. The predefined set of
      values can be bypassed by creative use of the Originate action or by certain
      dialplan configurations, which is beyond the ability of Asterisk to analyze at
      run-time. Attempting to work around these scenarios would result in severely         
      restricting the applications or functions and prevent their usage for legitimate
      means. As such, any additional security vulnerabilities, where an
      application/function that would normally require the "system" class
      authorization can be executed by users with the "originate" class authorization,
      will not be addressed. Instead, the README-SERIOUSLY.bestpractices.txt file has
      been updated to reflect that the AMI Originate action can result in commands
      requiring the "system" class authorization to be executed. Proper system
      configuration can limit the impact of such scenarios.         
                
      (closes issue ASTERISK-20132)
      Reported by: Zubair Ashraf of IBM X-Force Research
      ........
      
      Merged revisions 371998 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 371999 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 372000 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d624f2c5
  8. Feb 18, 2010
Loading