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

目标: 1000 元 · 已筹: 1336

100%

CWE-234 未对缺失参数进行处理 类漏洞列表 1

CWE-234 未对缺失参数进行处理 类弱点 1 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-234属于参数处理缺陷,指函数在接收参数不足时,仍从栈中弹出预期数量的参数,导致读取非法内存。攻击者可利用此漏洞引发栈溢出或信息泄露,进而执行恶意代码。开发者应避免依赖隐式栈操作,改用显式参数传递或变长参数安全机制,并严格校验输入参数数量,确保函数调用与定义一致,从而消除潜在风险。

MITRE CWE 官方描述
CWE:CWE-234 未能处理缺失参数(Failure to Handle Missing Parameter) 英文:如果发送给函数的参数过少,该函数仍会从栈中弹出预期数量的参数。同样,可变数量参数的函数也可能出现参数耗尽的情况。
常见影响 (2)
Integrity, Confidentiality, Availability, Access ControlExecute Unauthorized Code or Commands, Gain Privileges or Assume Identity
There is the potential for arbitrary code execution with privileges of the vulnerable program if function parameter list is exhausted.
AvailabilityDoS: Crash, Exit, or Restart
Potentially a program could fail if it needs more arguments then are available.
缓解措施 (2)
Build and CompilationThis issue can be simply combated with the use of proper build process.
ImplementationForward declare all functions. This is the recommended solution. Properly forward declaration of all used functions will result in a compiler error if too few arguments are sent to a function.
代码示例 (1)
The following example demonstrates the weakness.
foo_funct(one, two); void foo_funct(int one, int two, int three) { printf("1) %d\n2) %d\n3) %d\n", one, two, three); }
Bad · C
void some_function(int foo, ...) { int a[3], i; va_list ap; va_start(ap, foo); for (i = 0; i < sizeof(a) / sizeof(int); i++) a[i] = va_arg(ap, int); va_end(ap); } int main(int argc, char *argv[]) { some_function(17, 42); }
Bad · C
CVE ID标题CVSS风险等级Published
CVE-2022-20933 Cisco Meraki MX Series Security Appliances 安全漏洞 — Cisco Meraki MX Firmware 8.6 High2022-10-26

CWE-234(未对缺失参数进行处理) 是常见的弱点类别,本平台收录该类弱点关联的 1 条 CVE 漏洞。