|
|
|
|
CWE-689: Permission Race Condition During Resource Copy
| | Permission Race Condition During Resource Copy |
Definition in a New Window
|
| Compound Element ID: 689 (Compound Element Base: Composite) | | Status: Draft |
Description
Description Summary 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.
Time of Introduction Common Consequences | Scope | Effect |
Confidentiality Integrity | Technical Impact: Read application
data; Modify application
data |
Observed Examples | Reference | Description |
| 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. |
Other Notes
|
This is a general issue, although few subtypes are currently known. The
most common examples occur in file archive extraction, in which the product
begins the extraction with insecure default permissions, then only sets the
final permissions (as specified in the archive) once the copy is complete.
The larger the archive, the larger the timing window for the race condition.
This weakness has also occurred in some operating system utilities that
perform copies of deeply nested directories containing a large number of
files.
|
Weakness Ordinalities | Ordinality | Description |
Primary | (where
the weakness exists independent of other weaknesses) |
Relationships Research Gaps
|
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.
|
Content History | Modifications |
|---|
| Modification Date | Modifier | Organization | Source |
|---|
| 2008-09-08 | CWE Content Team | MITRE | Internal | | updated Applicable_Platforms, Relationships, Other_Notes,
Weakness_Ordinalities | | 2009-03-10 | CWE Content Team | MITRE | Internal | | updated Related_Attack_Patterns | | 2010-09-27 | CWE Content Team | MITRE | Internal | | updated Relationships | | 2011-06-01 | CWE Content Team | MITRE | Internal | | updated Common_Consequences |
|