This weakness takes an input of "<qsize> <string>" where qsize is the length of the array to generate and sort for timing and string is an arbitrary string to use as data to pass around. The weakness uses a double checked lock to initialize a shared static data class in an attempt to be efficient (not block threads when the data is initialized) however this introduces a possibility for a thread to return from the method while another thread is in the process of initializing the data. This will lead to an access of uninitialized data, resulting in a StringIndexOutOfBoundsException. This malicious behavior is tiggered when qsize >= 5000000, and not to occur when qsize <= 50.
stonesoup.jtree.Main
$SS_TC_ROOT/$SS_TC_INSTALL:$SS_TC_ROOT/$SS_TC_INSTALL/lib/*:$SS_TC_ROOT/$SS_TC_INSTALL/lib/opt/*:$SS_TC_DEPS/java/stonesoup/socket/*:$SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar
UNSPECIFIED
UNSPECIFIED
java $SS_JAVA_OPTS -Djava.library.path=$SS_TC_DEPS/lib64/ -cp "$SS_JAVA_CLASSPATH" stonesoup.jtree.Main
env ANT_HOME=$SS_TC_DEPS/ant ant $SS_ANT_OPTS -Dstonesoup.database.postgres.required=no -Dstonesoup.hibernate.postgres.required=no -Dstonesoup.hibernate.mysql.required=no -Dstonesoup.database.mysql.required=no -Dstonesoup.socket.required=yes -lib $SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar -Dstonesoup.socket.lib.dir="$SS_TC_DEPS/java/stonesoup/socket" -Dstonesoup.hibernate.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/mysql" -Dstonesoup.hibernate.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/postgres" -Dstonesoup.database.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/database/mysql" -Dstonesoup.database.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/database/postgres" -Dstonesoup.lttng.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng" -Dstonesoup.lttng.dummy.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng-dummy" -Ddir.dist=$SS_TC_ROOT/$SS_TC_INSTALL build
cp -r lib $SS_TC_ROOT/$SS_TC_INSTALL
Environment variable defining string value.
NONE
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
input/good-01
STDOUT-01 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-01/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining string value.
NONE
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
-l 1 input/good-02/
STDOUT-02 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-02/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining string value.
NONE
None
None
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
input/good-03/jtree-good-03.tar.gz
STDOUT-03 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-03/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining string value.
NONE
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
-l 2 input/good-04/jtree-good-04.tar.gz
STDOUT-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-04/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining string value.
NONE
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
input/good-01/ input/good-02/ input/good-03/jtree-good-03.tar.gz input/good-04/jtree-good-04.tar.gz
STDOUT-05-01 AND STDOUT-05-02 AND STDOUT-05-03 AND STDOUT-05-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-05/output1.txt
good-05/output2.txt
good-05/output3.txt
good-05/output4.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining string value.
UNEXPECTED_STATE
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
-l 1 input/good-02/
weakness_started_zQbjpwg1PjQotV1FrT0Q AND ((NOT PERFORMER AND (race_condition_rtrZYVOqHF OR race_condition_stderr_Q3e5NT0PEe) AND NOT timeout_UaN4wrGznS) or (PERFORMER AND NOT ((race_condition_rtrZYVOqHF OR race_condition_stderr_Q3e5NT0PEe) OR timeout_UaN4wrGznS OR controlled_exit_1k9tnVwCJ2)))
(NOT PERFORMER AND (race_condition_rtrZYVOqHF OR race_condition_stderr_Q3e5NT0PEe) AND NOT timeout_UaN4wrGznS) or (PERFORMER AND NOT ((race_condition_rtrZYVOqHF OR race_condition_stderr_Q3e5NT0PEe) OR timeout_UaN4wrGznS OR controlled_exit_1k9tnVwCJ2))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
java.lang.StringIndexOutOfBoundsException: String index out of range:
None
java.lang.StringIndexOutOfBoundsException: String index out of range:
None
stonesoup_trace:weakness_start
Environment variable defining string value.
UNEXPECTED_STATE
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
input/good-03/jtree-good-03.tar.gz
weakness_started_umlcS7gSbhRN3wikJobz AND ((NOT PERFORMER AND (race_condition_5rXbbbnBsd OR race_condition_stderr_gBstl4AXzT) AND NOT timeout_dnsfiDtRdM) or (PERFORMER AND NOT ((race_condition_5rXbbbnBsd OR race_condition_stderr_gBstl4AXzT) OR timeout_dnsfiDtRdM OR controlled_exit_du7yWxDD3l)))
(NOT PERFORMER AND (race_condition_5rXbbbnBsd OR race_condition_stderr_gBstl4AXzT) AND NOT timeout_dnsfiDtRdM) or (PERFORMER AND NOT ((race_condition_5rXbbbnBsd OR race_condition_stderr_gBstl4AXzT) OR timeout_dnsfiDtRdM OR controlled_exit_du7yWxDD3l))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
java.lang.StringIndexOutOfBoundsException: String index out of range:
None
java.lang.StringIndexOutOfBoundsException: String index out of range:
None
stonesoup_trace:weakness_start