vulnfix
vulnfix copied to clipboard
Previous snapshot/mutate run did not produce snapshot file
Dear authors,
I would like appreciate for your valuable work and contributions to the academic community. I am currently facing challenges experimenting with your artifact and would appreciate your assistance in resolving them.
I attempted to integrate a custom benchmark set into your tool; however, most of the runs encountered failures due to the following errors:
==============================first case==============================
[run_bin_snapshot] Return code from the run: 54
[cleanup_snapshot_file] Previous snapshot/mutate run did not produce snapshot file
the following error is reproducible with
setup.sh
#!/bin/bash
git clone https://github.com/mdadams/jasper.git source
cd source/
git checkout e5463624837d08d404dc64bba74eca8ce0ded9a3
autoreconf -i
CC=clang CXX=clang++ CFLAGS="-fsanitize=address,integer,unsigned-integer-overflow -g" CXXFLAGS="-fsanitize=address,integer,unsigned-integer-overflow -g" ./configure --disable-shared
make -j10
cp src/appl/imginfo ../
and config
file
binary=.../imginfo
cmd=-f <exploit>
exploit=.../exploit
fix-location=jpc_dec.c:1244
crash-location=jpc_dec.c:1244
runtime-dir=.../runtime
source-dir=.../source
fix-file-path=src/libjasper/jpc/jpc_dec.c
fix-line=1244
build-cmd=make clean && make
# CFLAGS="-static -fsanitize=address -g" CXXFLAGS="-static -fsanitize=address -g" -j10
The target program terminates with logs as the following.
jpc_dec.c:1244:19: runtime error: unsigned integer overflow: 1 - 2147483647 cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior jpc_dec.c:1244:19 in
error: cannot decode code stream
cannot load image
==============================second case============================== while analyzing the logs, I suspect that the tool failed to generate invariants, as indicated by the following log entries:
[DEBUG] [post_process_of_initial_snapshots] Final vars in each snapshot : {'p_manager->m_info_data', 'l_cp->tx0', ...}
[DEBUG] [generate_input_from_snapshots] BEFORE BACKEND: # passing: 0; # failing: 100
[INFO] [run] Running Daikon for inference. This make take a while ...
[DEBUG] [run] Raw daikon output is:
[INFO] [main] --- Initial patch invariants - #(0) : [] ---
[INFO] [main] --- Final patch invariants - #(0) : [] ---
[INFO] [main] Could not infer a patch invariant with the current invariant templates/grammar.
[INFO] [main] Attempting to generate patches from 0 patch invariant(s) ...
[INFO] [main] No patches generated.
[INFO] [main] VulnFix finished. Please find results at .../runtime/result.
The following message is found at vulnfix.log.debug
I suspect that these issues might be due to incorrect configuration settings. Could you kindly provide guidance on how to resolve these issues? Additionally, if further details regarding the setup are required for a more thorough diagnosis, please let me know.
Thank you.