Edited by Jim Moore, 5 May 2007
This version was created based on Version 4 of the template contained in N0056. It contains changes decided at Meeting #4 of OWGV.
8.x SM-004 Out of bounds array element access8.x.1 Description of application vulnerabilityUnpredictable behaviour can occur when accessing the elements of an array outside the bounds of the array. 8.x.2 Cross referenceCWE: 129 8.x.3 CategorizationSee clause 5.?. 8.x.4 Mechanism of failureArrays are defined, perhaps statically, perhaps dynamically, to have given bounds. In order to access an element of the array, index values for one or more dimensions of the array must be computed. If the index values does not fall within the defined bounds of the array, then access might occur to the wrong element of the array, or access might occur to storage that is outside the array. A write to a location outside the array may change the value of other data variables or may even change program code. 8.x.5 Possible ways to avoid the vulnerabilityThe vulnerability can be avoided by not using arrays, by using whole array operations, by checking and preventing access beyond the bounds of the array, or by catching erroneous accesses when they occur. The compiler might generate appropriate code, the run-time system might perform checking, or the programmer might explicitly code appropriate checks. 8.x.6 Assumed variations among languagesThis vulnerability description is intended to be applicable to languages with the following characteristics:
8.x.7 Avoiding the vulnerability or mitigating its effectsSoftware developers can avoid the vulnerability or mitigate its ill effects in the following ways:
|
8.<x> <unique immutable identifier> <short title><Notes on template header. The number "x" depends on the order in which the vulnerabilities are listed in Clause 8. It will be assigned by the editor. The "unique immutable identifier" is intended to provide an enduring identifier for the vulnerability description, even if their order is changed in the document. The "short title" should be a noun phrase summarizing the description of the application vulnerability. No additional text should appear here.> 8.<x>.1 Description of application vulnerability<Replace this with a brief description of the application vulnerability. It should be a short paragraph.> 8.<x>.2 Cross referenceCWE: <Replace this with the CWE identifier. At a later date, other cross-references may be added.> 8.<x>.3 CategorizationSee clause 5.?. <Replace this with the categorization according to the analysis in Clause 5. At a later date, other categorization schemes may be added.> 8.<x>.4 Mechanism of failure<Replace this with a brief description of the mechanism of failure. This description provides the link between the programming language vulnerability and the application vulnerability. It should be a short paragraph.> 8.<x>.5 Possible ways to avoid the vulnerability<Replace this with a description of the various points at which the chain of causation could be broken. It should be a short paragraph.> 8.<x>.6 Assumed variations among languagesThis vulnerability description is intended to be applicable to languages with the following characteristics: <Replace this with a bullet list summarizing the pertinent range of characteristics of languages for which this discussion is applicable. This list is intended to assist readers attempting to apply the guidance to languages that have not been treated in the language-specific annexes.> 8.<x>.7 Avoiding the vulnerability or mitigating its effectsSoftware developers can avoid the vulnerability or mitigate its ill effects in the following ways: <Replace this with a bullet list summarizing various ways in which programmers can avoid the vulnerability or contain its bad effects. Begin with the more direct, concrete, and effective means and then progress to the more indirect, abstract, and probabilistic means. |