...
Simultaneously opening a file multiple times can result in unexpected errors and nonportable behavior.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
FIO31FIO24-C | Medium | Probable | No | HighNo | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| IO.RACE IO.BRAW | File system race condition File Open for Both Read and Write | ||||||
| LDRA tool suite |
| 75 D | Partially implemented | ||||||
| Parasoft C/C++test |
| CERT_C-FIO24-a | Avoid race conditions while accessing files | ||||||
| CERT C: Rec. FIO24-C | Checks for situations where previously opened resources are reopened |
Related Vulnerabilities
...
| (rec. fully covered) |
Related Guidelines
| SEI CERT C Secure Coding Standard | FIO45-C. Avoid TOCTOU race conditions while accessing files |
| SEI CERT C++ Coding Standard | VOID FIO21-CPP. Do not simultaneously open the same file multiple times |
| MITRE CWE | CWE-362, Concurrent Execution Using Shared Resource with Improper Synchronization ("Race Condition") CWE-675, Duplicate Operations on Resource |
...