引入方式
Implementation
适用平台
编程语言
名称: C (Undetermined)
名称: C++ (Undetermined)
常见后果
| 影响范围 |
影响 |
可能性 |
| Other | Varies by Context, Quality Degradation, Unexpected State
注意: If the function is used incorrectly, then it could result in security problems. | |
观察示例
| 参考资料 |
描述 |
| Library has multiple buffer overflows using sprintf() and strcpy() |
| Buffer overflow using strcat() |
| Buffer overflow using strcpy() |
| Buffer overflow using strcpy() |
| Vulnerable use of strcpy() changed to use safer strlcpy() |
| Buffer overflow using strcpy() |
潜在缓解措施
Phases : Build and Compilation // Implementation
Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the "banned.h" include file from Microsoft's SDL. [REF-554] [REF-1009] [REF-7]
检测方法
Automated Static Analysis - Binary or Bytecode
有效性 : High
Manual Static Analysis - Binary or Bytecode
有效性 : SOAR Partial
Dynamic Analysis with Manual Results Interpretation
有效性 : High
Manual Static Analysis - Source Code
有效性 : High
Automated Static Analysis - Source Code
有效性 : High
Automated Static Analysis
有效性 : SOAR Partial
Architecture or Design Review
有效性 : High
漏洞映射说明
依据 : This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
备注 : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
备注
This weakness is different than CWE-242 (Use of Inherently Dangerous Function). CWE-242 covers functions with such significant security problems that they can never be guaranteed to be safe. Some functions, if used properly, do not directly pose a security risk, but can introduce a weakness if not called correctly. These are regarded as potentially dangerous. A well-known example is the strcpy() function. When provided with a destination buffer that is larger than its source, strcpy() will not overflow. However, it is so often misused that some developers prohibit strcpy() entirely.
参考资料
REF-6
Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors
Katrina Tsipenyuk, Brian Chess, Gary McGraw.
https://cwe.mitre.org/documents/sources/SevenPerniciousKingdoms.pdf REF-554
Security Development Lifecycle (SDL) Banned Function Calls
Michael Howard.
https://learn.microsoft.com/en-us/previous-versions/bb288454(v=msdn.10)?redirectedfrom=MSDN REF-1009
Microsoft's Free Security Tools - banned.h
Tim Rains.
https://www.microsoft.com/en-us/security/blog/2012/08/30/microsofts-free-security-tools-banned-h/ REF-7
Writing Secure Code
Michael Howard, David LeBlanc.
https://www.microsoftpressstore.com/store/writing-secure-code-9780735617223 REF-62
The Art of Software Security Assessment
Mark Dowd, John McDonald, Justin Schuh.
REF-1479
State-of-the-Art Resources (SOAR) for Software Vulnerability Detection, Test, and Evaluation
Gregory Larsen, E. Kenneth Hong Fong, David A. Wheeler, Rama S. Moorthy.
https://www.ida.org/-/media/feature/publications/s/st/stateoftheart-resources-soar-for-software-vulnerability-detection-test-and-evaluation/p-5061.ashx
提交记录
| 名称 |
组织 |
日期 |
发布日期 |
Version |
| 7 Pernicious Kingdoms |
|
2008-04-11 +00:00 |
2008-04-11 +00:00 |
Draft 9 |
修改记录
| 名称 |
组织 |
日期 |
备注 |
| Sean Eidemiller |
Cigital |
2008-07-01 +00:00 |
added/updated demonstrative examples |
| Eric Dalci |
Cigital |
2008-07-01 +00:00 |
updated Potential_Mitigations, Time_of_Introduction |
| CWE Content Team |
MITRE |
2008-09-08 +00:00 |
updated Applicable_Platforms, Relationships, Other_Notes, Taxonomy_Mappings, Weakness_Ordinalities |
| CWE Content Team |
MITRE |
2008-11-24 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2009-07-27 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2010-02-16 +00:00 |
updated Demonstrative_Examples, Other_Notes, References, Relationship_Notes |
| CWE Content Team |
MITRE |
2011-06-01 +00:00 |
updated Common_Consequences |
| CWE Content Team |
MITRE |
2011-06-27 +00:00 |
updated Common_Consequences, Observed_Examples, Potential_Mitigations, References, Relationships |
| CWE Content Team |
MITRE |
2011-09-13 +00:00 |
updated Potential_Mitigations, Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2012-05-11 +00:00 |
updated References, Related_Attack_Patterns, Relationships, Weakness_Ordinalities |
| CWE Content Team |
MITRE |
2014-07-30 +00:00 |
updated Detection_Factors, Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2017-05-03 +00:00 |
updated Related_Attack_Patterns |
| CWE Content Team |
MITRE |
2017-11-08 +00:00 |
updated Causal_Nature, References, Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2018-03-27 +00:00 |
updated References |
| CWE Content Team |
MITRE |
2019-01-03 +00:00 |
updated Relationships, Weakness_Ordinalities |
| CWE Content Team |
MITRE |
2020-02-24 +00:00 |
updated Detection_Factors, References, Relationships |
| CWE Content Team |
MITRE |
2020-12-10 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2021-03-15 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2023-01-31 +00:00 |
updated Description |
| CWE Content Team |
MITRE |
2023-04-27 +00:00 |
updated References, Relationships, Time_of_Introduction |
| CWE Content Team |
MITRE |
2023-06-29 +00:00 |
updated Mapping_Notes |
| CWE Content Team |
MITRE |
2025-09-09 +00:00 |
updated Detection_Factors, References |
| CWE Content Team |
MITRE |
2025-12-11 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2026-04-30 +00:00 |
updated Potential_Mitigations, References |
| CWE Content Team |
MITRE |
2026-10-28 +00:00 |
updated Diagram, References |