The product reads data past the end, or before the beginning, of the intended buffer.
N/A
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
CVE: CVE-2023-1018
The reference implementation code for a Trusted Platform Module does not implement length checks on data, allowing for an attacker to read 2 bytes past the end of a buffer.
CVE: CVE-2020-11899 — KEV
Out-of-bounds read in IP stack used in embedded systems, as exploited in the wild per CISA KEV.
CVE: CVE-2014-0160 — KEV
Chain: "Heartbleed" bug receives an inconsistent length parameter (CWE-130) enabling an out-of-bounds read (CWE-126), returning memory that could include private cryptographic keys and other sensitive data.
CVE: CVE-2021-40985
HTML conversion package has a buffer under-read, allowing a crash
CVE: CVE-2018-10887
Chain: unexpected sign extension (CWE-194) leads to integer overflow (CWE-190), causing an out-of-bounds read (CWE-125)
CVE: CVE-2009-2523
Chain: product does not handle when an input string is not NULL terminated (CWE-170), leading to buffer over-read (CWE-125) or heap-based buffer overflow (CWE-122).
CVE: CVE-2018-16069
Chain: series of floating-point precision errors (CWE-1339) in a web browser rendering engine causes out-of-bounds read (CWE-125), giving access to cross-origin data
CVE: CVE-2004-0112
out-of-bounds read due to improper length check
CVE: CVE-2004-0183
packet with large number of specified elements cause out-of-bounds read.
CVE: CVE-2004-0221
packet with large number of specified elements cause out-of-bounds read.
CVE: CVE-2004-0184
out-of-bounds read, resultant from integer underflow
CVE: CVE-2004-1940
large length value causes out-of-bounds read
CVE: CVE-2004-0421
malformed image causes out-of-bounds read
CVE: CVE-2008-4113
OS kernel trusts userland-supplied length value, allowing reading of sensitive information
N/A
Phase | Note |
---|---|
Implementation | N/A |
Intro: In the following code, the method retrieves a value from an array at a specific array index location that is given as an input parameter to the method
Body: However, this method only verifies that the given array index is less than the maximum length of the array but does not check for the minimum value (CWE-839). This will allow a negative value to be accepted as the input array index, which will result in a out of bounds read (CWE-125) and may allow access to sensitive memory. The input array index should be checked to verify that is within the maximum and minimum range required for the array (CWE-129). In this example the if statement should be modified to include a minimum range check, as shown below.
int getValueFromArray(int *array, int len, int index) { int value; // check that the array index is less than the maximum // length of the array if (index < len) { // get the value at the specified index of the array value = array[index]; } // if array index is invalid then output error message // and return value indicating error else { printf("Value is: %d\n", array[index]); value = -1; } return value; }