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

目标: 1000 元 · 已筹: 1000

100.0%

CWE-240 对不一致结构体元素处理不恰当 类漏洞列表 2

CWE-240 对不一致结构体元素处理不恰当 类弱点 2 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-240属于结构一致性处理不当漏洞,指软件未能正确应对多个结构元素间应保持一致却出现不一致的情况。攻击者常通过构造畸形或冲突的数据结构,触发程序逻辑错误,进而导致崩溃、数据损坏或远程代码执行。开发者应实施严格的输入验证与状态同步机制,确保在处理多元素结构时强制校验其一致性,并及时处理异常状态,从而消除潜在的安全隐患。

MITRE CWE 官方描述
CWE:CWE-240 不一致结构元素处理不当 英文:当两个或多个结构元素应当保持一致但实际不一致时,产品未进行处理或处理不当。
常见影响 (1)
Integrity, OtherVaries by Context, Unexpected State
代码示例 (1)
In the following C/C++ example the method processMessageFromSocket() will get a message from a socket, placed into a buffer, and will parse the contents of the buffer into a structure that contains the message length and the message body. A for loop is used to copy the message body into a local character string which will be passed to another method for processing.
int processMessageFromSocket(int socket) { int success; char buffer[BUFFER_SIZE]; char message[MESSAGE_SIZE]; // get message from socket and store into buffer //Ignoring possibliity that buffer > BUFFER_SIZE if (getMessage(socket, buffer, BUFFER_SIZE) > 0) { // place contents of the buffer into message structure ExMessage *msg = recastBuffer(buffer); // copy message body into string for processing int index; for (index = 0; index < msg->msgLength; index++) { message[index] = msg->msgBody[index]; } message[index] = '\0'; // process message success = processMessage(message); } return success; }
Bad · C
CVE ID标题CVSS风险等级Published
CVE-2025-4321 Silabs RS9116W 安全漏洞 — RS9116W 6.5AIMediumAI2025-11-17
CVE-2021-31890 Siemens Nucleus ReadyStart 安全漏洞 — Capital Embedded AR Classic 431-422 7.5 High2021-11-09

CWE-240(对不一致结构体元素处理不恰当) 是常见的弱点类别,本平台收录该类弱点关联的 2 条 CVE 漏洞。