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

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

Test Case IDCandidate153683
Bad / Good / MixedBadBad test case
AuthorIARPA STONESOUP Test and Evaluation team
Associations
Test suite: 102  
Application: 18  
Added byCharles Oliveira
LanguageC
Type of test caseSource Code
Input string
Expected Output
Instructions
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.
Metadata
- Base program: Gimp
- Source Taint: ENVIRONMENT_VARIABLE
- Data Type: HEAP_POINTER
- Data Flow: INDEX_ALIAS_1
- Control Flow: INTERPROCEDURAL_2
File(s)
Flaw

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): 371, 372, 373, 374, 375, 376, 377, 378, 379