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

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

Test Case IDCandidate149233
Bad / Good / MixedBadBad test case
AuthorNIST, Alexander Hoole, Aurelien Delaitre
Associations
Good pair: 149234  
Replacing: 1893  
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_fctptr-bad race_stat_fctptr-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 using random calls to function pointers.
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): 84