CWE-761 释放一个不在缓冲区起始位置的指针 类弱点 1 条 CVE 漏洞汇总,含 AI 中文分析。
CWE-761属于内存管理漏洞,指程序对非缓冲区起始地址的指针调用free()函数。攻击者常利用此缺陷导致程序崩溃,或在特定条件下篡改关键变量甚至执行恶意代码。开发者应避免修改堆分配内存的原始指针,确保free()仅作用于malloc等函数返回的初始地址,从而防止内存破坏风险。
#define SUCCESS (1) #define FAILURE (0) int contains_char(char c){ char *str; str = (char*)malloc(20*sizeof(char)); strcpy(str, "Search Me!"); while( *str != NULL){ if( *str == c ){ /* matched char, free string and return success */ free(str); return SUCCESS; } /* didn't match yet, increment pointer and try next char */ str = str + 1; } /* we did not match the char in the string, free mem and return failure */ free(str); return FAILURE; }#define SUCCESS (1) #define FAILURE (0) int cointains_char(char c){ char *str; int i = 0; str = (char*)malloc(20*sizeof(char)); strcpy(str, "Search Me!"); while( i < strlen(str) ){ if( str[i] == c ){ /* matched char, free string and return success */ free(str); return SUCCESS; } /* didn't match yet, increment pointer and try next char */ i = i + 1; } /* we did not match the char in the string, free mem and return failure */ free(str); return FAILURE; }char **ap, *argv[10], *inputstring; for (ap = argv; (*ap = strsep(&inputstring, " \t")) != NULL;) if (**ap != '\0') if (++ap >= &argv[10]) break; /.../ free(ap[4]);| CVE ID | 标题 | CVSS | 风险等级 | Published |
|---|---|---|---|---|
| CVE-2025-47749 | Fuji Electric V-SFT 安全漏洞 — V-SFT | 7.8 | High | 2025-05-19 |
CWE-761(释放一个不在缓冲区起始位置的指针) 是常见的弱点类别,本平台收录该类弱点关联的 1 条 CVE 漏洞。