cvekit
LIVE
All CWEs

CWE-761

Free of Pointer not at Start of Buffer

VariantIncompleteSimple2 CVEs
The product calls free() on a pointer to a memory resource that was allocated on the heap, but the pointer is not at the start of the buffer.

Extended description

This can cause the product to crash, or in some cases, modify critical program variables or execute code. This weakness often occurs when the memory is allocated explicitly on the heap with one of the malloc() family functions and free() is called, but pointer arithmetic has caused the pointer to be in the interior or end of the buffer.

Common consequences1

  • IntegrityAvailabilityConfidentialityModify MemoryDoS: Crash, Exit, or RestartExecute Unauthorized Code or Commands

Potential mitigations4

  1. Implementation

    When utilizing pointer arithmetic to traverse a buffer, use a separate variable to track progress through memory and preserve the originally allocated address for later freeing.

  2. Implementation

    When programming in C++, consider using smart pointers provided by the boost library to help correctly and consistently manage memory.

  3. Architecture and Design

    Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, glibc in Linux provides protection against free of invalid pointers.

  4. Architecture and Design

    Use a language that provides abstractions for memory allocation and deallocation.

Relationships2

CVEs referencing this CWE2

CVEDescriptionSeverityEPSSFlagsModified
CVE-2024-31413

Free of pointer not at start of buffer vulnerability exists in CX-One CX-One CXONE-AL[][]D-V4 (The version which was installed with a DVD ver. 4.61.1 or lower, and was updated through CX-One V4 auto update in January 2024 or prior) and Sysmac Studio SYSMAC-SE2[][][] (The version which was installed with a DVD ver. 1.56 or lower, and was updated through Sysmac Studio V1 auto update in January 2024 or prior). Opening a specially crafted project file may lead to arbitrary code execution.

MEDIUM5.9
0.24%p15
2026-04-15
CVE-2025-47749

V-SFT v6.2.5.0 and earlier contains an issue with free of pointer not at start of buffer in VS6EditData.dll!CWinFontInf::WinFontMsgCheck function. Opening specially crafted V7 or V8 files may lead to crash, information disclosure, and arbitrary code execution.

HIGH7.8
0.19%p9
2025-05-19