目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1000

100.0%

CWE-588 尝试访问一个非结构体指针的子域 类漏洞列表 1

CWE-588 尝试访问一个非结构体指针的子域 类弱点 1 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-588 属于内存访问错误类漏洞,源于将非结构体类型强制转换为结构体类型后访问其字段。攻击者利用此缺陷可触发内存访问违规或导致数据损坏,进而可能引发程序崩溃或远程代码执行。开发者应避免此类强制类型转换,确保指针类型与目标结构体严格匹配,并使用静态分析工具检测非法内存访问,从而从源头消除隐患,保障软件内存安全。

MITRE CWE 官方描述
CWE:CWE-588 Attempt to Access Child of a Non-structure Pointer 英文:将非结构体类型(non-structure type)强制转换为结构体类型(structure type)并访问其字段,可能导致内存访问错误(memory access errors)或数据损坏(data corruption)。
常见影响 (2)
IntegrityModify Memory
Adjacent variables in memory may be corrupted by assignments performed on fields after the cast.
AvailabilityDoS: Crash, Exit, or Restart
Execution may end due to a memory access error.
缓解措施 (2)
RequirementsThe choice could be made to use a language that is not susceptible to these issues.
ImplementationReview of type casting operations can identify locations where incompatible types are cast.
代码示例 (1)
The following example demonstrates the weakness.
struct foo { int i; } ... int main(int argc, char **argv) { *foo = (struct foo *)main; foo->i = 2; return foo->i; }
Bad · C
CVE ID标题CVSS风险等级Published
CVE-2021-3510 Zephyr 安全漏洞 — zephyr 7.5 High2021-10-05

CWE-588(尝试访问一个非结构体指针的子域) 是常见的弱点类别,本平台收录该类弱点关联的 1 条 CVE 漏洞。