All rules →
Rules / C/C++
SHIELD-CPP-018

TOCTOU race with access then open

mediumC/C++CWE-367CVSS 6.3

What it detects

Checking permissions with access before open creates a time-of-check to time-of-use race.

How to fix

Open the file first and check permissions on the resulting descriptor with fstat.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-018: TOCTOU race with access then open — Zennoxa Shield