National Institute of Standards and Technology
Package illustrating a test case

Test case 153709

Description

This test case creates a function pointer that takes 2 const char * as input and returns an int. If the length of the taint source is 0 mod 3, the test case sets the function pointer to be strcmp. If the length of the taint source is 1 mod 3, the test case sets the function pointer to strcoll. Otherwise the test case sets the function pointer to be the address passed in by the taint source. When the test case calls the function pointer, if the function pointer is strcmp or strcoll, the weakness proceeds without error. However, if the function pointer is the value passed in from the taint source, the function call results in a segmentation fault or illegal instruction fault.
Metadata
- Base program: FFmpeg
- Source Taint: SHARED_MEMORY
- Data Type: UNION
- Data Flow: ADDRESS_AS_VARIABLE
- Control Flow: CALLBACK

Flaws

Test Suites

Documentation

Have any comments on this test case? Please, send us an email.