Common Weakness Enumeration

CWE-742

Grouping Prohibited

CERT C Secure Coding Standard (2008) Chapter 9 - Memory Management (MEM)

Status: Obsolete

Weaknesses in this category are related to the rules and recommendations in the Memory Management (MEM) chapter of the CERT C Secure Coding Standard (2008).

Grouping entries organize the catalogue and should not be used to map the root cause of a vulnerability.

Mapping guidance

This entry is a Grouping. Using groupings for mapping has been discouraged since 2019. They are informal organizational groupings of weaknesses that can help CWE users with data aggregation, navigation, and browsing. However, they are not weaknesses in themselves.

See member weaknesses of this category.

Relationships and members
Has Member: CWE-119 · View CWE-734
Has Member: CWE-128 · View CWE-734
Has Member: CWE-131 · View CWE-734
Has Member: CWE-190 · View CWE-734
Has Member: CWE-20 · View CWE-734
Has Member: CWE-226 · View CWE-734
Has Member: CWE-244 · View CWE-734
Has Member: CWE-252 · View CWE-734
Has Member: CWE-415 · View CWE-734
Has Member: CWE-416 · View CWE-734
Has Member: CWE-476 · View CWE-734
Has Member: CWE-528 · View CWE-734
Has Member: CWE-590 · View CWE-734
Has Member: CWE-591 · View CWE-734
Has Member: CWE-628 · View CWE-734
Has Member: CWE-665 · View CWE-734
Has Member: CWE-687 · View CWE-734
Has Member: CWE-754 · View CWE-734
Notes

Relationship

In the 2008 version of the CERT C Secure Coding standard, the following rules were mapped to the following CWE IDs:

CWE-20 MEM10-C Define and use a pointer validation function

CWE-119 MEM09-C Do not assume memory allocation routines initialize memory

CWE-128 MEM07-C Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t

CWE-131 MEM35-C Allocate sufficient memory for an object

CWE-190 MEM07-C Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t

CWE-190 MEM35-C Allocate sufficient memory for an object

CWE-226 MEM03-C Clear sensitive information stored in reusable resources returned for reuse

CWE-244 MEM03-C Clear sensitive information stored in reusable resources returned for reuse

CWE-252 MEM32-C Detect and handle memory allocation errors

CWE-415 MEM00-C Allocate and free memory in the same module, at the same level of abstraction

CWE-415 MEM01-C Store a new value in pointers immediately after free()

CWE-415 MEM31-C Free dynamically allocated memory exactly once

CWE-416 MEM00-C Allocate and free memory in the same module, at the same level of abstraction

CWE-416 MEM01-C Store a new value in pointers immediately after free()

CWE-416 MEM30-C Do not access freed memory

CWE-476 MEM32-C Detect and handle memory allocation errors

CWE-528 MEM06-C Ensure that sensitive data is not written out to disk

CWE-590 MEM34-C Only free memory allocated dynamically

CWE-591 MEM06-C Ensure that sensitive data is not written out to disk

CWE-628 MEM08-C Use realloc() only to resize dynamically allocated arrays

CWE-665 MEM09-C Do not assume memory allocation routines initialize memory

CWE-687 MEM04-C Do not perform zero length allocations

CWE-754 MEM32-C Detect and handle memory allocation errors

Content history
Submission: CWE Content Team · MITRE · 2008-11-24 · CWE 1.1
Modification: CWE Content Team · MITRE · 2011-09-13 · CWE 2.1

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Description, Name, Relationship_Notes

Modification: CWE Content Team · MITRE · 2019-01-03 · CWE 3.2

updated Description, Name, References

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Mapping_Notes, Type

0 vulnerabilities reference this CWE, most recent first.

No vulnerabilities reference this CWE.

No mitigation information available for this CWE.

No CAPEC attack patterns related to this CWE.