CWE-622 函数挂钩参数的验证不恰当

Improper Validation of Function Hook Arguments

结构: Simple

Abstraction: Variant

状态: Draft

被利用可能性: unkown

基本描述

A product adds hooks to user-accessible API functions, but does not properly validate the arguments. This could lead to resultant vulnerabilities.

扩展描述

Such hooks can be used in defensive software that runs with privileges, such as anti-virus or firewall, which hooks kernel calls. When the arguments are not validated, they could be used to bypass the protection scheme or attack the product itself.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 20 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 20 cwe_View_ID: 699 cwe_Ordinal: Primary

适用平台

Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Integrity Unexpected State

可能的缓解方案

Architecture and Design

策略:

Ensure that all arguments are verified, as defined by the API you are protecting.

Architecture and Design

策略:

Drop privileges before invoking such functions, if possible.

分析过的案例

标识 说明 链接
CVE-2007-0708 DoS in firewall using standard Microsoft functions https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0708
CVE-2006-7160 DoS in firewall using standard Microsoft functions https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-7160
CVE-2007-1376 function does not verify that its argument is the proper type, leading to arbitrary memory write https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1376
CVE-2007-1220 invalid syscall arguments bypass code execution limits https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1220
CVE-2006-4541 DoS in IDS via NULL argument https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4541

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
Software Fault Patterns SFP27 Tainted input to environment