National Institute of Standards and Technology
Package illustrating a test case

Test case 153634

Description

This 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: GNU Grep
- Source Taint: SOCKET
- Data Type: SIMPLE
- Data Flow: BASIC
- Control Flow: SEQUENCE

Flaws

Test Suites

Documentation

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