Skip to content

Commit

Permalink
[benchmark] add 2 projects
Browse files Browse the repository at this point in the history
  • Loading branch information
spearo2 committed Nov 20, 2024
1 parent bcbde19 commit 410d6ab
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 0 deletions.
15 changes: 15 additions & 0 deletions benchmark/wireshark/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM prosyslab/bug-bench-base

RUN apt-get -y update
RUN apt-get -y install wget flex

COPY build.sh $SRC
ENV PROGRAM=wireshark-2.0.0

ENV URL=https://github.com/prosyslab-warehouse/wireshark-2.0.0
ENV GIT_REPO_NAME=wireshark

RUN git clone $URL
RUN mv $GIT_REPO_NAME $PROGRAM

WORKDIR $PROGRAM
14 changes: 14 additions & 0 deletions benchmark/wireshark/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

if [[ $1 == "sparrow" ]]; then
echo "not ready yet"
elif [[ $1 == "infer" ]]; then
echo "not ready yet"
elif [[ $1 == "codeql" ]]; then
echo "not ready yet"
elif [[ $1 == "haechi" ]]; then
echo "not ready yet"
else
echo "Unknown build target"
exit 1
fi
48 changes: 48 additions & 0 deletions benchmark/wireshark/label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[{
"project": "wireshark",
"version": "v2.0.0",
"file": "epan/dissectors/packet-cp2179.c",
"line": 724,
"type": "div-by-zero",
"CVE": "CVE-2023-2906",
"report": "https://gitlab.com/wireshark/wireshark/-/issues/19229",
"patch": "https://gitlab.com/wireshark/wireshark/-/commit/0b874ad0f50f71a5b780cb915ea62f8625112402",
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L724",
"source": {
"file": "unknown",
"line": -1,
"code": "-"
},
"sink": {
"file": "epan/dissectors/packet-cp2179.c",
"line": 724,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L724"
},
"bug-trace": [{
"file": "epan/dissectors/packet-cp2179.c",
"line": 1058,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L1058",
"cmd": "call"
}, {
"file": "epan/dissectors/packet-cp2179.c",
"line": 1061,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L1028",
"cmd": "call"
}, {
"file": "epan/dissectors/packet-cp2179.c",
"line": 1028,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L1028",
"cmd": "call"
}, {
"file": "epan/dissectors/packet-cp2179.c",
"line": 723,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L723",
"cmd": "assign",
"comment": "this function is not shown on the source code (library)"
}, {
"file": "epan/dissectors/packet-cp2179.c",
"line": 724,
"code": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L724",
"cmd": "divide"
}]
}]
15 changes: 15 additions & 0 deletions benchmark/xmorph/20240707/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM prosyslab/bug-bench-base

RUN apt-get -y update
RUN apt-get -y install wget flex

COPY build.sh $SRC
ENV PROGRAM=xmorph-20240707

ENV URL=https://github.com/prosyslab-warehouse/xmorph-20240707
ENV GIT_REPO_NAME=xmorph

RUN git clone $URL
RUN mv $GIT_REPO_NAME $PROGRAM

WORKDIR $PROGRAM
14 changes: 14 additions & 0 deletions benchmark/xmorph/20240707/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

if [[ $1 == "sparrow" ]]; then
echo "not ready yet"
elif [[ $1 == "infer" ]]; then
echo "not ready yet"
elif [[ $1 == "codeql" ]]; then
echo "not ready yet"
elif [[ $1 == "haechi" ]]; then
echo "not ready yet"
else
echo "Unknown build target"
exit 1
fi
102 changes: 102 additions & 0 deletions benchmark/xmorph/20240707/label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[{
"project": "xmorph",
"version": "20240707",
"file": "libmorph/spline.c",
"line": 338,
"type": "div-by-zero",
"CVE": null,
"report": "https://sourceforge.net/p/xmorph/patches/",
"patch": null,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spline.c#L338",
"source": {
"file": "xmorph/xmorph.c",
"line": 432,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/xmorph.c#L432"
},
"sink": {
"file": "libmorph/spline.c",
"line": 338,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spline.c#L338"
},
"bug-trace": [{
"file": "xmorph/xmorph.c",
"line": 432,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/xmorph.c#L432",
"cmd": "read"
}, {
"file": "xmorph/xmorph.c",
"line": 444,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/xmorph.c#L444",
"cmd": "call"
}, {
"file": "xmorph/diw_map.c",
"line": 570,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L570",
"cmd": "call"
}, {
"file": "xmorph/diw_map.c",
"line": 347,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L347",
"cmd": "call"
}, {
"file": "xmorph/diw_map.c",
"line": 317,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L317",
"cmd": "assign"
}, {
"file": "xmorph/diw_map.c",
"line": 320,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L320",
"cmd": "return"
}, {
"file": "xmorph/diw_map.c",
"line": 359,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L359",
"cmd": "assign"
}, {
"file": "xmorph/diw_map.c",
"line": 364,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L364",
"cmd": "call"
}, {
"file": "xmorph/diw_map.c",
"line": 126,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L126",
"cmd": "assign"
}, {
"file": "xmorph/diw_map.c",
"line": 173,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L173",
"cmd": "multiply"
}, {
"file": "xmorph/diw_map.c",
"line": 186,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/xmorph/diw_map.c#L186",
"cmd": "call"
}, {
"file": "libmorph/spl-array.c",
"line": 125,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spl-array.c#L125",
"cmd": "call"
}, {
"file": "libmorph/spline.c",
"line": 281,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spline.c#L281",
"cmd": "subtract"
}, {
"file": "libmorph/spline.c",
"line": 282,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spline.c#L282",
"cmd": "multiply"
}, {
"file": "libmorph/spline.c",
"line": 338,
"code": "https://github.com/prosyslab-warehouse/xmorph-20240707/blob/master/libmorph/spline.c#L338",
"cmd": "divide"
}],
"similarity": [{
"ID": "wireshark-v2.0.0",
"bug": "https://github.com/prosyslab-warehouse/wireshark-2.0.0/blob/master/epan/dissectors/packet-cp2179.c#L724",
"score": 0.7
}]
}]

0 comments on commit 410d6ab

Please sign in to comment.