Skip to content
OpenAdvisories

Weakness (CWE)

CWE-415: Double Free

Variant Draft

The product calls free() twice on the same memory address.

How to prevent it (3 mitigations)
  1. Architecture and Design

    Choose a language that provides automatic memory management.

  2. Implementation

    Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.

  3. Implementation

    Use a static analysis tool to find double free instances.

Source: MITRE CWE-415

2 results · Clear filters · Feed

  • Medium 5.5
    CVE-2026-86962 Public exploit

    A double free issue was addressed with improved memory management. This issue is fixed in iOS 26.7 and iPadOS 26.7, iOS…

  • Medium 6.6
    CVE-2021-22600 Exploited Public exploit

    Double Free in net/packet/af_packet.c leading to priviledge escalation

    A double free bug in packet_set_ring() in net/packet/af_packet.c can be exploited by a local user through crafted syscalls to escalate privileges or deny service. We recommend upgrading kernel past the effected versions or rebuilding past ec6af094ea28f0f2dda1…

    KEV Apr 11, 2022