diff options
Diffstat (limited to 'fuzz/harnesses')
-rwxr-xr-x | fuzz/harnesses/assert | 32 | ||||
-rwxr-xr-x | fuzz/harnesses/assert-rsa-h-p | 33 | ||||
-rwxr-xr-x | fuzz/harnesses/assert-u2f | 32 | ||||
-rwxr-xr-x | fuzz/harnesses/cred | 31 | ||||
-rwxr-xr-x | fuzz/harnesses/cred-rsa-h-p | 32 | ||||
-rwxr-xr-x | fuzz/harnesses/cred-u2f | 31 | ||||
-rwxr-xr-x | fuzz/harnesses/cred-u2f-exclude | 33 | ||||
-rwxr-xr-x | fuzz/harnesses/fido2-assert-G | 31 | ||||
-rwxr-xr-x | fuzz/harnesses/fido2-assert-V | 32 | ||||
-rwxr-xr-x | fuzz/harnesses/fido2-cred-M | 31 | ||||
-rwxr-xr-x | fuzz/harnesses/fido2-cred-V | 31 | ||||
-rwxr-xr-x | fuzz/harnesses/fuzz_assert | 29 | ||||
-rwxr-xr-x | fuzz/harnesses/fuzz_bio | 29 | ||||
-rwxr-xr-x | fuzz/harnesses/fuzz_cred | 28 | ||||
-rwxr-xr-x | fuzz/harnesses/fuzz_credman | 28 | ||||
-rwxr-xr-x | fuzz/harnesses/fuzz_mgmt | 29 |
16 files changed, 492 insertions, 0 deletions
diff --git a/fuzz/harnesses/assert b/fuzz/harnesses/assert new file mode 100755 index 0000000..55cd889 --- /dev/null +++ b/fuzz/harnesses/assert | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=assert | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/assert \ | ||
17 | ${T}/pubkey nodev 2>/dev/null 1>&2 | ||
18 | done | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | sync) | ||
23 | sync | ||
24 | ;; | ||
25 | run) | ||
26 | run | ||
27 | exit 0 | ||
28 | ;; | ||
29 | *) | ||
30 | echo unknown command "$1" | ||
31 | exit 1 | ||
32 | esac | ||
diff --git a/fuzz/harnesses/assert-rsa-h-p b/fuzz/harnesses/assert-rsa-h-p new file mode 100755 index 0000000..8eb9ea6 --- /dev/null +++ b/fuzz/harnesses/assert-rsa-h-p | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=assert-rsa-h-p | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey ../hmac-salt" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/assert \ | ||
17 | -t rsa -h ${T}/hmac-out -s ${T}/hmac-salt \ | ||
18 | -p ${T}/pubkey nodev 2>/dev/null 1>&2 | ||
19 | done | ||
20 | } | ||
21 | |||
22 | case "$1" in | ||
23 | sync) | ||
24 | sync | ||
25 | ;; | ||
26 | run) | ||
27 | run | ||
28 | exit 0 | ||
29 | ;; | ||
30 | *) | ||
31 | echo unknown command "$1" | ||
32 | exit 1 | ||
33 | esac | ||
diff --git a/fuzz/harnesses/assert-u2f b/fuzz/harnesses/assert-u2f new file mode 100755 index 0000000..257d1d6 --- /dev/null +++ b/fuzz/harnesses/assert-u2f | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=assert-u2f | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../cred_id ../pubkey" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/assert -up \ | ||
17 | -a ${T}/cred_id ${T}/pubkey nodev 2>/dev/null 1>&2 | ||
18 | done | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | sync) | ||
23 | sync | ||
24 | ;; | ||
25 | run) | ||
26 | run | ||
27 | exit 0 | ||
28 | ;; | ||
29 | *) | ||
30 | echo unknown command "$1" | ||
31 | exit 1 | ||
32 | esac | ||
diff --git a/fuzz/harnesses/cred b/fuzz/harnesses/cred new file mode 100755 index 0000000..71ee845 --- /dev/null +++ b/fuzz/harnesses/cred | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=cred | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/cred \ | ||
16 | -k ${T}/pubkey -i ${T}/cred_id nodev 2>/dev/null 1>&2 | ||
17 | done | ||
18 | } | ||
19 | |||
20 | case "$1" in | ||
21 | sync) | ||
22 | sync | ||
23 | ;; | ||
24 | run) | ||
25 | run | ||
26 | exit 0 | ||
27 | ;; | ||
28 | *) | ||
29 | echo unknown command "$1" | ||
30 | exit 1 | ||
31 | esac | ||
diff --git a/fuzz/harnesses/cred-rsa-h-p b/fuzz/harnesses/cred-rsa-h-p new file mode 100755 index 0000000..bb14c23 --- /dev/null +++ b/fuzz/harnesses/cred-rsa-h-p | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=cred-rsa-h-p | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/cred \ | ||
16 | -t rsa -r -k ${T}/pubkey -i ${T}/cred_id -h nodev \ | ||
17 | 2>/dev/null 1>&2 | ||
18 | done | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | sync) | ||
23 | sync | ||
24 | ;; | ||
25 | run) | ||
26 | run | ||
27 | exit 0 | ||
28 | ;; | ||
29 | *) | ||
30 | echo unknown command "$1" | ||
31 | exit 1 | ||
32 | esac | ||
diff --git a/fuzz/harnesses/cred-u2f b/fuzz/harnesses/cred-u2f new file mode 100755 index 0000000..3af4393 --- /dev/null +++ b/fuzz/harnesses/cred-u2f | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=cred-u2f | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/cred \ | ||
16 | -k ${T}/pubkey -i ${T}/cred_id -u nodev 2>/dev/null 1>&2 | ||
17 | done | ||
18 | } | ||
19 | |||
20 | case "$1" in | ||
21 | sync) | ||
22 | sync | ||
23 | ;; | ||
24 | run) | ||
25 | run | ||
26 | exit 0 | ||
27 | ;; | ||
28 | *) | ||
29 | echo unknown command "$1" | ||
30 | exit 1 | ||
31 | esac | ||
diff --git a/fuzz/harnesses/cred-u2f-exclude b/fuzz/harnesses/cred-u2f-exclude new file mode 100755 index 0000000..3777134 --- /dev/null +++ b/fuzz/harnesses/cred-u2f-exclude | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=cred-u2f-exclude | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../excl_id" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/cred \ | ||
17 | -k ${T}/pubkey -i ${T}/cred_id -e ${T}/excl_id \ | ||
18 | -u nodev 2>/dev/null 1>&2 | ||
19 | done | ||
20 | } | ||
21 | |||
22 | case "$1" in | ||
23 | sync) | ||
24 | sync | ||
25 | ;; | ||
26 | run) | ||
27 | run | ||
28 | exit 0 | ||
29 | ;; | ||
30 | *) | ||
31 | echo unknown command "$1" | ||
32 | exit 1 | ||
33 | esac | ||
diff --git a/fuzz/harnesses/fido2-assert-G b/fuzz/harnesses/fido2-assert-G new file mode 100755 index 0000000..6671449 --- /dev/null +++ b/fuzz/harnesses/fido2-assert-G | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fido2-assert-G | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/tools/fido2-assert \ | ||
16 | -G -i - nodev 2>/dev/null 1>&2 | ||
17 | done | ||
18 | } | ||
19 | |||
20 | case "$1" in | ||
21 | sync) | ||
22 | sync | ||
23 | ;; | ||
24 | run) | ||
25 | run | ||
26 | exit 0 | ||
27 | ;; | ||
28 | *) | ||
29 | echo unknown command "$1" | ||
30 | exit 1 | ||
31 | esac | ||
diff --git a/fuzz/harnesses/fido2-assert-V b/fuzz/harnesses/fido2-assert-V new file mode 100755 index 0000000..898cb0f --- /dev/null +++ b/fuzz/harnesses/fido2-assert-V | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fido2-assert-V | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/tools/fido2-assert -V \ | ||
17 | pubkey es256 2>/dev/null 1>&2 | ||
18 | done | ||
19 | } | ||
20 | |||
21 | case "$1" in | ||
22 | sync) | ||
23 | sync | ||
24 | ;; | ||
25 | run) | ||
26 | run | ||
27 | exit 0 | ||
28 | ;; | ||
29 | *) | ||
30 | echo unknown command "$1" | ||
31 | exit 1 | ||
32 | esac | ||
diff --git a/fuzz/harnesses/fido2-cred-M b/fuzz/harnesses/fido2-cred-M new file mode 100755 index 0000000..f82fbf7 --- /dev/null +++ b/fuzz/harnesses/fido2-cred-M | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fido2-cred-M | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/tools/fido2-cred -M \ | ||
16 | -q -i - nodev 2>/dev/null 1>&2 | ||
17 | done | ||
18 | } | ||
19 | |||
20 | case "$1" in | ||
21 | sync) | ||
22 | sync | ||
23 | ;; | ||
24 | run) | ||
25 | run | ||
26 | exit 0 | ||
27 | ;; | ||
28 | *) | ||
29 | echo unknown command "$1" | ||
30 | exit 1 | ||
31 | esac | ||
diff --git a/fuzz/harnesses/fido2-cred-V b/fuzz/harnesses/fido2-cred-V new file mode 100755 index 0000000..13a648f --- /dev/null +++ b/fuzz/harnesses/fido2-cred-V | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fido2-cred-V | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | find ${T}/queue -type f | while read f; do | ||
15 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/tools/fido2-cred -V \ | ||
16 | -o cred 2>/dev/null 1>&2 | ||
17 | done | ||
18 | } | ||
19 | |||
20 | case "$1" in | ||
21 | sync) | ||
22 | sync | ||
23 | ;; | ||
24 | run) | ||
25 | run | ||
26 | exit 0 | ||
27 | ;; | ||
28 | *) | ||
29 | echo unknown command "$1" | ||
30 | exit 1 | ||
31 | esac | ||
diff --git a/fuzz/harnesses/fuzz_assert b/fuzz/harnesses/fuzz_assert new file mode 100755 index 0000000..6a0baa9 --- /dev/null +++ b/fuzz/harnesses/fuzz_assert | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_assert | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_assert -max_len=17408 -runs=1 ${T}/corpus \ | ||
15 | 2>/dev/null 1>&2 | ||
16 | } | ||
17 | |||
18 | case "$1" in | ||
19 | sync) | ||
20 | sync | ||
21 | ;; | ||
22 | run) | ||
23 | run | ||
24 | exit 0 | ||
25 | ;; | ||
26 | *) | ||
27 | echo unknown command "$1" | ||
28 | exit 1 | ||
29 | esac | ||
diff --git a/fuzz/harnesses/fuzz_bio b/fuzz/harnesses/fuzz_bio new file mode 100755 index 0000000..f4bab19 --- /dev/null +++ b/fuzz/harnesses/fuzz_bio | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_bio | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_bio -max_len=17408 -runs=1 ${T}/corpus \ | ||
15 | 2>/dev/null 1>&2 | ||
16 | } | ||
17 | |||
18 | case "$1" in | ||
19 | sync) | ||
20 | sync | ||
21 | ;; | ||
22 | run) | ||
23 | run | ||
24 | exit 0 | ||
25 | ;; | ||
26 | *) | ||
27 | echo unknown command "$1" | ||
28 | exit 1 | ||
29 | esac | ||
diff --git a/fuzz/harnesses/fuzz_cred b/fuzz/harnesses/fuzz_cred new file mode 100755 index 0000000..8dfb168 --- /dev/null +++ b/fuzz/harnesses/fuzz_cred | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_cred | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_cred -max_len=17408 -runs=1 ${T}/corpus 2>/dev/null 1>&2 | ||
15 | } | ||
16 | |||
17 | case "$1" in | ||
18 | sync) | ||
19 | sync | ||
20 | ;; | ||
21 | run) | ||
22 | run | ||
23 | exit 0 | ||
24 | ;; | ||
25 | *) | ||
26 | echo unknown command "$1" | ||
27 | exit 1 | ||
28 | esac | ||
diff --git a/fuzz/harnesses/fuzz_credman b/fuzz/harnesses/fuzz_credman new file mode 100755 index 0000000..7721a58 --- /dev/null +++ b/fuzz/harnesses/fuzz_credman | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_credman | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_credman -max_len=17408 -runs=1 ${T}/corpus 2>/dev/null 1>&2 | ||
15 | } | ||
16 | |||
17 | case "$1" in | ||
18 | sync) | ||
19 | sync | ||
20 | ;; | ||
21 | run) | ||
22 | run | ||
23 | exit 0 | ||
24 | ;; | ||
25 | *) | ||
26 | echo unknown command "$1" | ||
27 | exit 1 | ||
28 | esac | ||
diff --git a/fuzz/harnesses/fuzz_mgmt b/fuzz/harnesses/fuzz_mgmt new file mode 100755 index 0000000..9224eea --- /dev/null +++ b/fuzz/harnesses/fuzz_mgmt | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_mgmt | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_mgmt -max_len=17408 -runs=1 ${T}/corpus \ | ||
15 | 2>/dev/null 1>&2 | ||
16 | } | ||
17 | |||
18 | case "$1" in | ||
19 | sync) | ||
20 | sync | ||
21 | ;; | ||
22 | run) | ||
23 | run | ||
24 | exit 0 | ||
25 | ;; | ||
26 | *) | ||
27 | echo unknown command "$1" | ||
28 | exit 1 | ||
29 | esac | ||