Back to the previous page
| Test Case ID | 153757 |
| Bad / Good / Mixed | Bad |
| Author | IARPA STONESOUP Test and Evaluation team |
| Associations | Test suite: 102 Application: 5 |
| 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: PostgreSQL - Source Taint: SHARED_MEMORY - Data Type: ARRAY - Data Flow: ADDRESS_AS_LINEAR_EXPRESSION - Control Flow: INFINITE_LOOP |
| File(s) |
|
| Flaw |
There are no comments
Have any comments on this test case? Please,
.
- heapam.c
- runFifos.py
- service_mon.sh
- shm_setup.c
- C-C843A-PSQL-07-ST04-DT01-DF13-CF03-01.xml
- C-C843A-PSQL-07-ST04-DT01-DF13-CF03-01.yaml
File Contains:
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') on line(s): 437, 438, 439
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') on line(s): 437, 438, 439

