Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previous snapshot/mutate run did not produce snapshot file #5

Open
spearo2 opened this issue Apr 2, 2024 · 0 comments
Open

Previous snapshot/mutate run did not produce snapshot file #5

spearo2 opened this issue Apr 2, 2024 · 0 comments

Comments

@spearo2
Copy link

spearo2 commented Apr 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant