CWE

Common Weakness Enumeration

社区开发的软件和硬件弱点类型清单

2021 CWE Most Important Hardware Weaknesses
CWE Top 25 Most Dangerous Weaknesses
Home>CWE List> cwe-单个字典定义(4.10)
ID

CWE-363:种族条件启用链接以下

Weakness ID: 363
Abstraction:Base
Structure:Simple
View customized information:
+Description
The product checks the status of a file or directory before accessing it, which produces a race condition in which the file can be replaced with a link before the access is performed, causing the product to access the wrong file.
+Extended Description
尽管开发人员可能期望在检查时间和使用时间之间存在一个非常狭窄的时间窗口,但仍有种族条件。攻击者可能会导致产品减速(例如,内存消耗),从而导致时间窗口变得更大。或者,在某些情况下,攻击者可以通过大量攻击来赢得比赛。
+Relationships
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+Relevant to the view "Research Concepts" (CWE-1000)
Nature 类型 ID Name
ChildOf Base基础 - 仍然主要独立于资源或技术的弱点,但有足够的细节来提供特定的检测和预防方法。基本水平的弱点通常用以下维度的2或3来描述问题:行为,财产,技术,语言和资源。 367 Time-of-check Time-of-use (TOCTOU) Race Condition
canpreceede Base基础 - 仍然主要独立于资源或技术的弱点,但有足够的细节来提供特定的检测和预防方法。基本水平的弱点通常用以下维度的2或3来描述问题:行为,财产,技术,语言和资源。 59 在文件访问之前,链接分辨率不正确(“链接后面”)
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+与“软件开发”视图相关(CWE-699)
Nature 类型 ID Name
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 557 并发问题
+Modes Of Introduction
Section HelpThe different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.
阶段 Note
Architecture and Design
Implementation
+Applicable Platforms
Section HelpThis listing shows possible areas for which the given weakness could appear. These may be for specific named Languages, Operating Systems, Architectures, Paradigms, Technologies, or a class of such platforms. The platform is listed along with how frequently the given weakness appears for that instance.

Languages

Class: Not Language-Specific(Undetermined Prevalence)

+Common Consequences
Section HelpThis table specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
Scope 影响 Likelihood
保密
正直

Technical Impact:Read Files or Directories; Modify Files or Directories

+示例的例子

Example 1

如果用户有权,此代码将打印文件的内容。

(bad code)
Example Language:php
function readFile($filename){
$ user = getCurrentuser();

//resolve file if its a symbolic link
if(is_link($filename)){
$filename = readlink($filename);
}

if(fileowner($filename) == $user){
echo file_get_contents($realFile);
return;
}
别的{
echo 'Access denied';
return false;
}
}

该代码在检查文件并打印其内容之前试图解决符号链接。但是,攻击者可能能够将文件从真实文件更改为对is_link()和file_get_contents()的调用之间的符号链接,从而允许读取任意文件。请注意,此代码无法记录尝试访问(CWE-778).

+会员资格
Section HelpThis MemberOf Relationships table shows additional CWE Categories and Views that reference this weakness as a member. This information is often useful in understanding where a weakness fits within the context of external information sources.
Nature 类型 ID Name
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 748 证书C安全编码Standard (2008) Appendix - POSIX (POS)
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 988 SFP次要集群:种族条件窗口
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 1171 SEI CERT C Coding Standard - Guidelines 50. POSIX (POS)
+Notes

Relationship

This is already covered by the "Link Following" weakness (CWE-59). It is included here because so many people associate race conditions with link problems; however, not all link following issues involve race conditions.
+Taxonomy Mappings
Mapped Taxonomy Name Node ID 合身 Mapped Node Name
PLOVER Race condition enabling link following
证书C安全编码 POS35-C Exact Avoid race conditions while checking for the existence of a symbolic link
Software Fault Patterns SFP20 Race Condition Window
+参考
[Ref-62] Mark Dowd,John McDonald和Justin Schuh。“软件安全评估的艺术”。第9章,“种族条件”,第526页。第一版。艾迪生·卫斯理。2006。
+Content History
+提交
提交日期 Submitter Organization
2006-07-19 PLOVER
+Modifications
Modification Date 修饰符 Organization
2008-07-01 Eric Dalci 雪茄
updated Time_of_Introduction
2008-09-08 CWE Content Team MITRE
updated Relationships, Other_Notes, Taxonomy_Mappings
2008-10-14 CWE Content Team MITRE
更新的描述,其他_notes,关系
2008-11-24 CWE Content Team MITRE
更新的关系,分类_mappings
2010-12-13 CWE Content Team MITRE
更新其他_notes,关系_notes
2011-03-29 CWE Content Team MITRE
更新了示范_examples
2011-06-01 CWE Content Team MITRE
更新的common_cconsquences
2012-05-11 CWE Content Team MITRE
更新了示范示例,参考,关系
2014-07-30 CWE Content Team MITRE
更新的关系,分类_mappings
2017-11-08 CWE Content Team MITRE
updated Applicable_Platforms, Taxonomy_Mappings
2019-01-03 CWE Content Team MITRE
updated Relationships
2020-02-24 CWE Content Team MITRE
updated Relationships
2023-01-31 CWE Content Team MITRE
updated Description
提供更多信息 - 请选择其他过滤器。
Page Last Updated:January 31, 2023