SAMATE Logo NIST Logo The SAMATE Project Department of Homeland Security
Downloads:  Download this Test Case #149231

Back to the previous page... Back to the previous page

Test Case IDCandidate149231
Bad / Good / MixedBadBad test case
AuthorNIST, Alexander Hoole, Aurelien Delaitre
Associations
Good pair: 149232  
Replacing: 1891  
Test suite: 100  
Added byCharles Oliveira
LanguageC
Type of test caseSource Code
Input string
Expected Output
Instructionsgcc -Wall -g -O0 -std=gnu99 -o race_stat_basic-bad race_stat_basic-bad.c
Submission date2015-03-23
DescriptionThe test case shows a Time-of-Check-Time-of-Use (TOCTOU) race condition between checking file attributes and then opening and writing to the file.
File(s)
Flaw

There are no comments
Have any comments on this test case? Please, .

File Contains:
CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition on line(s): 41