Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Failing to check for the existence of links can result in a critical system file being overwritten, leading to data integrity violations.

Recommendation

Severity

Likelihood

Remediation Cost

Detectable

Repairable

Priority

Level

POS01-C

medium

Medium

Likely

likely

No

high

No

P6

L2

Automated Detection

Tool

Version

Checker

Description

Compass/ROSE

 

 



Could report possible violations of this rule by flagging calls to open() that do not have an O_NOFOLLOW flag and that are not preceded by a call to lstat() and succeeded by a call to fstat

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

MITRE CWECWE-59, Failure to resolve links before file access (aka "link following")
CWE-362, Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
CWE-367, Time-of-check, time-of-use (TOCTOU) race condition

Bibliography



...