Back to the previous page
Test Case ID | ![]() |
Bad / Good / Mixed | Bad![]() |
Author | IARPA STONESOUP Test and Evaluation team |
Associations | Test suite: 102 Application: 18 |
Added by | Charles Oliveira |
Language | C |
Type of test case | Source Code |
Input string | |
Expected Output | |
Instructions | See src/INSTALL file for instructions on how to install. |
Submission date | 2015-10-06 |
Description | This 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. Metadata - Base program: Gimp - Source Taint: SHARED_MEMORY - Data Type: HEAP_POINTER - Data Flow: ADDRESS_AS_VARIABLE - Control Flow: POINTER_TO_FUNCTION |
File(s) |
|
Flaw |
There are no comments
Have any comments on this test case? Please,
.
- gimpactiongroup.c
- service_mon.sh
- shm_setup.c
- C-C843A-GIMP-08-ST04-DT04-DF15-CF18-01.xml
- runFifos.py
- C-C843A-GIMP-08-ST04-DT04-DF15-CF18-01.yaml
File Contains:
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') on line(s): 1483, 1484, 1485
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') on line(s): 1483, 1484, 1485