...
Using a copy of a FILE
object in place of the original may result in a crash, which can be used in a denial-of-service attack.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
FIO38-C | Low | Probable | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| file-dereference | Partially checked | ||||||
Clang |
| misc-non-copyable-objects | Checked with clang-tidy | ||||||
Compass/ROSE |
Can detect simple violations of this rule | |||||||||
Coverity |
| MISRA C 2012 Rule 22.5 | Partially implemented | ||||||
LDRA tool suite |
| 591 S | Fully implemented | ||||||
RuleChecker |
| file-dereference | Partially checked | ||||||
R2017b | Invalid file position | fsetpos() is invoked with a file position argument not obtained from fgetpos() | |||||||
PRQA QA-C++ |
| 5013 |
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 |
---|---|---|
ISO/IEC TS 17961:2013 | Copying a FILE object [filecpy] | Prior to 2018-01-12: CERT: Unspecified Relationship |
Bibliography
[ISO/IEC 9899:2011] | 7.21.3, "Files" |
...
...