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

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

Test Case IDCandidate153757
Bad / Good / MixedBadBad test case
AuthorIARPA STONESOUP Test and Evaluation team
Test suite: 102  
Application: 5  
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 creates a struct that has a message_type field and a message_data field. The message_type field should be 1 if the message_data field contains a char*, and 0 if it contains an int. The message_data field is set to be the taint source, and the message_type field is set to 1. If the taint source can be converted to an integer, the message_data field is changed to the integer representation of the taint source. However, the message_type field is not updated. Subsequently, the test case tries to calculate the string length of the message_data field. Since the message_data field is an int, rather than a char*, this causes a segmentation fault.
- Base program: PostgreSQL
- Source Taint: SHARED_MEMORY
- Data Type: ARRAY
- Control Flow: INFINITE_LOOP

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

File Contains:
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') on line(s): 437, 438, 439