National Institute of Standards and Technology
Package illustrating a test case

Test case 150216


This test case implements two thread that both lock two shared mutex locks such that if the timing works out, they will cause each other to deadlock. The test case takes a control integer, the names of two control files, and an input string. The control integer and the two control files are used for timing within the test case to ensure that the test case follows an exploiting or benign execution path, and the input string is used as shared data for the threads to act upon. When executing with exploiting input the test case spawns two threads, the first thread (thread A) starts by pausing its execution while the second thread (thread B) locks the second mutex lock. Thread B then pauses its execution and allows thread A to lock the first mutex lock and try to lock the second mutex lock. Thread A will now hang on the call to lock the second mutex lock since thread B holds it, thread B will then try to grab the first mutex lock, but since thread A holds it the system will enter deadlock.
- Base program: Subversion
- Source Taint: SHARED_MEMORY
- Data Type: UNION
- Data Flow: ADDRESS_ALIAS_1
- Control Flow: SET_JUMP_LONG_JUMP


Test Suites


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