{"@ID": "742", "@Name": "CERT C Secure Coding Standard (2008) Chapter 9 - Memory Management (MEM)", "@Status": "Obsolete", "Summary": "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).", "Relationships": {"Has_Member": [{"@CWE_ID": "119", "@View_ID": "734"}, {"@CWE_ID": "128", "@View_ID": "734"}, {"@CWE_ID": "131", "@View_ID": "734"}, {"@CWE_ID": "190", "@View_ID": "734"}, {"@CWE_ID": "20", "@View_ID": "734"}, {"@CWE_ID": "226", "@View_ID": "734"}, {"@CWE_ID": "244", "@View_ID": "734"}, {"@CWE_ID": "252", "@View_ID": "734"}, {"@CWE_ID": "415", "@View_ID": "734"}, {"@CWE_ID": "416", "@View_ID": "734"}, {"@CWE_ID": "476", "@View_ID": "734"}, {"@CWE_ID": "528", "@View_ID": "734"}, {"@CWE_ID": "590", "@View_ID": "734"}, {"@CWE_ID": "591", "@View_ID": "734"}, {"@CWE_ID": "628", "@View_ID": "734"}, {"@CWE_ID": "665", "@View_ID": "734"}, {"@CWE_ID": "687", "@View_ID": "734"}, {"@CWE_ID": "754", "@View_ID": "734"}]}, "References": {"Reference": {"@External_Reference_ID": "REF-597"}}, "Mapping_Notes": {"Usage": "Prohibited", "Rationale": "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.", "Comments": "See member weaknesses of this category.", "Reasons": {"Reason": {"@Type": "Grouping"}}}, "Notes": {"Note": {"@Type": "Relationship", "xhtml:p": "In the 2008 version of the CERT C Secure Coding standard, the following rules were mapped to the following CWE IDs:", "xhtml:ul": {"xhtml:li": ["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"]}, "#text_blocks": ["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": {"Submission_Name": "CWE Content Team", "Submission_Organization": "MITRE", "Submission_Date": "2008-11-24", "Submission_Version": "1.1", "Submission_ReleaseDate": "2008-11-24"}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2011-09-13", "Modification_Version": "2.1", "Modification_ReleaseDate": "2011-09-13", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2017-11-08", "Modification_Version": "3.0", "Modification_ReleaseDate": "2017-11-08", "Modification_Comment": "updated Description, Name, Relationship_Notes"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2019-01-03", "Modification_Version": "3.2", "Modification_ReleaseDate": "2019-01-03", "Modification_Comment": "updated Description, Name, References"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Mapping_Notes"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2026-10-28", "Modification_Version": "5.0", "Modification_ReleaseDate": "2026-10-28", "Modification_Comment": "updated Mapping_Notes, Type"}], "Previous_Entry_Name": [{"@Date": "2017-11-08", "#text": "CERT C Secure Coding Section 08 - Memory Management (MEM)"}, {"@Date": "2019-01-03", "#text": "CERT C Secure Coding (2008 Version) Section 08 - Memory Management (MEM)"}]}, "entry_type": "Grouping"}
