Chi tiết CWE-689

CWE-689

Permission Race Condition During Resource Copy
2008-04-11
00h00 +00:00
Draft
2023-06-29
00h00 +00:00
Thông báo cho một CWE
Luôn được thông báo về mọi thay đổi đối với một CWE cụ thể.
Quản lý thông báo

Tên: Permission Race Condition During Resource Copy

The product, while copying or cloning a resource, does not set the resource's permissions or access control until the copy is complete, leaving the resource exposed to other spheres while the copy is taking place.

Thông tin chung

Các cách xuất hiện

Implementation

Nền tảng áp dụng

Ngôn ngữ

Tên: C (Undetermined)
Tên: Perl (Undetermined)

Hậu quả phổ biến

Phạm vi Tác động Khả năng xảy ra
Confidentiality
Integrity
Read Application Data, Modify Application Data

Ví dụ đã quan sát

Tài liệu tham khảo Mô tả

CVE-2002-0760

Archive extractor decompresses files with world-readable permissions, then later sets permissions to what the archive specified.

CVE-2005-2174

Product inserts a new object into database before setting the object's permissions, introducing a race condition.

CVE-2006-5214

Error file has weak permissions before a chmod is performed.

CVE-2005-2475

Archive permissions issue using hard link.

CVE-2003-0265

Database product creates files world-writable before initializing the setuid bits, leading to modification of executables.

Ghi chú ánh xạ lỗ hổng

Lý do : This is a Composite of multiple weaknesses that must all occur simultaneously.
Bình luận : While composites are supported in CWE, they have not been a focus of research. There is a chance that future research or CWE scope clarifications will change or deprecate them. Perform root-cause analysis to determine which weaknesses allow this issue to occur, and map to those weaknesses. For example, the delayed permission-setting in the resource copy might be intended functionality, but creation in a location with insecure permissions might not.

Mẫu tấn công liên quan

ID CAPEC Tên mẫu tấn công
CAPEC-26 Leveraging Race Conditions
The adversary targets a race condition occurring when multiple processes access and manipulate the same resource concurrently, and the outcome of the execution depends on the particular order in which the access takes place. The adversary can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance, a race condition can occur while accessing a file: the adversary can trick the system by replacing the original file with their version and cause the system to read the malicious file.
CAPEC-27 Leveraging Race Conditions via Symbolic Links
This attack leverages the use of symbolic links (Symlinks) in order to write to sensitive files. An attacker can create a Symlink link to a target file not otherwise accessible to them. When the privileged program tries to create a temporary file with the same name as the Symlink link, it will actually write to the target file pointed to by the attackers' Symlink link. If the attacker can insert malicious content in the temporary file they will be writing to the sensitive file by using the Symlink. The race occurs because the system checks if the temporary file exists, then creates the file. The attacker would typically create the Symlink during the interval between the check and the creation of the temporary file.

Ghi chú

Under-studied. It seems likely that this weakness could occur in any situation in which a complex or large copy operation occurs, when the resource can be made available to other spheres as soon as it is created, but before its initialization is complete.

Tài liệu tham khảo

REF-62

The Art of Software Security Assessment
Mark Dowd, John McDonald, Justin Schuh.

Gửi

Tên Tổ chức Ngày Ngày phát hành Version
CWE Content Team MITRE 2008-04-11 +00:00 2008-04-11 +00:00 Draft 9

Sửa đổi

Tên Tổ chức Ngày Bình luận
CWE Content Team MITRE 2008-09-08 +00:00 updated Applicable_Platforms, Relationships, Other_Notes, Weakness_Ordinalities
CWE Content Team MITRE 2009-03-10 +00:00 updated Related_Attack_Patterns
CWE Content Team MITRE 2010-09-27 +00:00 updated Relationships
CWE Content Team MITRE 2011-06-01 +00:00 updated Common_Consequences
CWE Content Team MITRE 2012-05-11 +00:00 updated References
CWE Content Team MITRE 2014-06-23 +00:00 updated Modes_of_Introduction, Other_Notes
CWE Content Team MITRE 2017-11-08 +00:00 updated Relationships
CWE Content Team MITRE 2020-02-24 +00:00 updated Relationships
CWE Content Team MITRE 2020-08-20 +00:00 updated Relationships
CWE Content Team MITRE 2023-04-27 +00:00 updated Relationships
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes