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

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

Test Case IDCandidate153334
Bad / Good / MixedBadBad test case
AuthorIARPA STONESOUP Test and Evaluation team
Test suite: 102  
Application: 6  
Added byCharles Oliveira
Type of test caseSource Code
Input string
Expected Output
See src/INSTALL file for instructions on how to install.
Submission date2015-10-06
DescriptionThis test case allocates a buffer on the stack, with a canary function pointer immediately after it. It checks if the taint source is less than 20 characters, and if so, it sets the canary function pointer to strlen and call realpath on the taint source, putting the result into the stack buffer. If realpath evaluates to 20 or more characters, realpath will overwrite the canary function pointer. The test case then calls the canary function pointer. If this pointer has been over-written, this call will result in a segmentation fault or illegal instruction fault.
- Base program: Tree
- Data Type: SIMPLE
- Data Flow: BASIC
- Control Flow: SEQUENCE

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

File Contains:
CWE-785: Use of Path Manipulation Function without Maximum-sized Buffer on line(s): 559, 560, 561, 562, 563, 564, 565, 566, 567