說的比較好的文章在這裏:
http://www.cis.syr.edu/~wedu/Teaching/IntrCompSec/LectureNotes_New/Race_Condition.pdf
TOCTOU: time of check - time of use
攻擊發生在 check 和 use 之間。
具體的 countermeasure 在上面提到的pdf 中也有所涉及,總結如下:
1. Turn check and use operations in one atomic operation.
2. check-use-check again approach.
3. check-use repeating approach.