...
TOCTOU race condition vulnerabilities can be exploited to gain elevated privileges.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
POS35-C | high | likely | medium | P18 | L1 |
Automated Detection
Tool | Version | Checker | Description |
|---|---|---|---|
| Compass/ROSE |
Can detect some violations of this rule. In particular, it ensures that calls to | |||||||||
| Coverity |
| TOCTOU | Implemented | ||||||
| Klocwork |
| SV.TOCTOU.FILE_ACCESS |
| Parasoft C/C++test |
|
|
| SECURITY-19 |
| , BD-TRS-SYMLINK | Implemented | ||
| Polyspace Bug Finder | R2016a | File access between time of check and use (TOCTOU) | File or folder might change state due to access race |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
Key here (explains table format and definitions)
Taxonomy | Taxonomy item | Relationship |
|---|---|---|
| CWE 2.11 | CWE-363, Race condition enabling link following | 2017-07-07: CERT: Exact |
CERT-CWE Mapping Notes
Key here for mapping notes
...
CWE-764 is about semaphores, or objects capable of being locked multiple times. Deadlock arises from multiple locks being acquired in a cyclic order, and generally does not arise from semaphores or recursive mutexes.
Bibliography
| [Dowd 2006] | Chapter 9, "UNIX 1: Privileges and Files" |
| [ISO/IEC 9899:2011] | Section 7.21, "Input/output <stdio.h>" |
| [Open Group 2004] | lstat() fstat() open() |
| [Seacord 2013] | Chapter 8, "File I/O" |
...
...