Difference between revisions of "Dangerous Function"

From OWASP
Jump to: navigation, search
 
Line 17: Line 17:
 
* The >> operator is unsafe to use when reading into a character buffer because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.
 
* The >> operator is unsafe to use when reading into a character buffer because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.
  
 +
==Examples ==
 +
 +
==Related Threats==
 +
 +
==Related Attacks==
  
 
[[Category:API Abuse]]
 
[[Category:API Abuse]]
 +
 +
==Related Vulnerabilities==
 +
 +
==Related Countermeasures==
 +
 +
==Categories==
  
 
[[Category:Implementation]]
 
[[Category:Implementation]]
Line 25: Line 36:
  
 
[[Category:C]]
 
[[Category:C]]
 +
 +
[[Category:Use of Dangerous API]]

Revision as of 12:46, 18 July 2006

This article includes content generously donated to OWASP by Fortify.JPG.

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.


Abstract

Functions that cannot be used safely should never be used.

Description

Certain functions behave in dangerous ways regardless of how they are used. Functions in this category were often implemented without taking security concerns into account.

Examples

  • The gets() function is unsafe because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer.
  • The >> operator is unsafe to use when reading into a character buffer because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.

Examples

Related Threats

Related Attacks

Related Vulnerabilities

Related Countermeasures

Categories