This is a replication package for ASE'24 paper "IR level Patch Presence Test for Binary".
- llvm@14
- Rust
Download the dataset from here, unzip. Make sure your directory structure is the same as below.
.
├── README.md (you are here)
├── Cargo.toml
├── react (entry point)
├── ir-analysis (LLVM IR analysis)
├── source-analysis (parse diff file)
└── dataset (** which you should put the dataset here **)
It is super easy to replicate the experimental results. Just run the following command in the current directory.
cargo run --release
You will get the results in stdout. log.txt
contains test results for each CVE-bitcode pair.
You may encounter an error from
llvm-sys
crate, you may fix it by settingLLVM_SYS_140_PREFIX
to the llvm@14 path.
The target file name format is filename_version_optimization_compiler
. For example, ffmpeg_n4.0_O0_x86_clang
is a bitcode file generated by RetDec.
The reference file name format is cvenumber_state
. For example, CVE-2018-0734_vuln
is a vulnerable bitcode file for the CVE. The state
can be vuln
or patch
, which means the patch file is generated by the commit that fixes the CVE.