Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that the maximum amount of allocatable memory is typically limited to a value less than SIZE_MAX (the maximum value of size_t). Always check the return value from a call to any memory allocation function.

...

Risk Assessment

Integer overflow in memory allocation functions can lead to buffer overflows that can be exploited by an attacker to execute arbitrary code with the permissions of the vulnerable process. Most implementations of calloc() now check to make sure integer overflow does not occur but it is not always safe to assume the version of calloc() being used is secure, particularly when using dynamically linnked libraries.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MEM37-C

Component

Value

Severity

3 (high)

Likelihood

1 (low) Remediation cost

1 (high)

P12

L1

References