CWE-394 未预期的状态编码或返回值

Unexpected Status Code or Return Value

结构: Simple

Abstraction: Base

状态: Draft

被利用可能性: unkown

基本描述

The software does not properly check when a function or operation returns a value that is legitimate for the function, but is not expected by the software.

相关缺陷

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

适用平台

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

常见的影响

范围 影响 注释
['Integrity', 'Other'] ['Unexpected State', 'Alter Execution Logic']

分析过的案例

标识 说明 链接
CVE-2004-1395 Certain packets (zero byte and other lengths) cause a recvfrom call to produce an unexpected return code that causes a server's listening loop to exit. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1395
CVE-2002-2124 Unchecked return code from recv() leads to infinite loop. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-2124
CVE-2005-2553 Kernel function does not properly handle when a null is returned by a function call, causing it to call another function that it shouldn't. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2553
CVE-2005-1858 Memory not properly cleared when read() function call returns fewer bytes than expected. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1858
CVE-2000-0536 Bypass access restrictions when connecting from IP whose DNS reverse lookup does not return a hostname. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0536
CVE-2001-0910 Bypass access restrictions when connecting from IP whose DNS reverse lookup does not return a hostname. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0910
CVE-2004-2371 Game server doesn't check return values for functions that handle text strings and associated size values. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2371
CVE-2005-1267 Resultant infinite loop when function call returns -1 value. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1267

Notes

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
PLOVER Unexpected Status Code or Return Value
Software Fault Patterns SFP4 Unchecked Status Condition
SEI CERT Perl Coding Standard EXP00-PL Imprecise Do not return undef