summaryrefslogtreecommitdiff
path: root/fuzz/harnesses
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/harnesses')
-rwxr-xr-xfuzz/harnesses/assert32
-rwxr-xr-xfuzz/harnesses/assert-rsa-h-p33
-rwxr-xr-xfuzz/harnesses/assert-u2f32
-rwxr-xr-xfuzz/harnesses/cred31
-rwxr-xr-xfuzz/harnesses/cred-rsa-h-p32
-rwxr-xr-xfuzz/harnesses/cred-u2f31
-rwxr-xr-xfuzz/harnesses/cred-u2f-exclude33
-rwxr-xr-xfuzz/harnesses/fido2-assert-G31
-rwxr-xr-xfuzz/harnesses/fido2-assert-V32
-rwxr-xr-xfuzz/harnesses/fido2-cred-M31
-rwxr-xr-xfuzz/harnesses/fido2-cred-V31
-rwxr-xr-xfuzz/harnesses/fuzz_assert29
-rwxr-xr-xfuzz/harnesses/fuzz_bio29
-rwxr-xr-xfuzz/harnesses/fuzz_cred28
-rwxr-xr-xfuzz/harnesses/fuzz_credman28
-rwxr-xr-xfuzz/harnesses/fuzz_mgmt29
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
6T=assert
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey" | \
11 tar -C ${T} -xf-
12}
13
14run() {
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
21case "$1" in
22sync)
23 sync
24 ;;
25run)
26 run
27 exit 0
28 ;;
29*)
30 echo unknown command "$1"
31 exit 1
32esac
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
6T=assert-rsa-h-p
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey ../hmac-salt" | \
11 tar -C ${T} -xf-
12}
13
14run() {
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
22case "$1" in
23sync)
24 sync
25 ;;
26run)
27 run
28 exit 0
29 ;;
30*)
31 echo unknown command "$1"
32 exit 1
33esac
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
6T=assert-u2f
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../cred_id ../pubkey" | \
11 tar -C ${T} -xf-
12}
13
14run() {
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
21case "$1" in
22sync)
23 sync
24 ;;
25run)
26 run
27 exit 0
28 ;;
29*)
30 echo unknown command "$1"
31 exit 1
32esac
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
6T=cred
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
20case "$1" in
21sync)
22 sync
23 ;;
24run)
25 run
26 exit 0
27 ;;
28*)
29 echo unknown command "$1"
30 exit 1
31esac
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
6T=cred-rsa-h-p
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
21case "$1" in
22sync)
23 sync
24 ;;
25run)
26 run
27 exit 0
28 ;;
29*)
30 echo unknown command "$1"
31 exit 1
32esac
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
6T=cred-u2f
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
20case "$1" in
21sync)
22 sync
23 ;;
24run)
25 run
26 exit 0
27 ;;
28*)
29 echo unknown command "$1"
30 exit 1
31esac
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
6T=cred-u2f-exclude
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../excl_id" | \
11 tar -C ${T} -xf-
12}
13
14run() {
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
22case "$1" in
23sync)
24 sync
25 ;;
26run)
27 run
28 exit 0
29 ;;
30*)
31 echo unknown command "$1"
32 exit 1
33esac
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
6T=fido2-assert-G
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
20case "$1" in
21sync)
22 sync
23 ;;
24run)
25 run
26 exit 0
27 ;;
28*)
29 echo unknown command "$1"
30 exit 1
31esac
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
6T=fido2-assert-V
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey" | \
11 tar -C ${T} -xf-
12}
13
14run() {
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
21case "$1" in
22sync)
23 sync
24 ;;
25run)
26 run
27 exit 0
28 ;;
29*)
30 echo unknown command "$1"
31 exit 1
32esac
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
6T=fido2-cred-M
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
20case "$1" in
21sync)
22 sync
23 ;;
24run)
25 run
26 exit 0
27 ;;
28*)
29 echo unknown command "$1"
30 exit 1
31esac
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
6T=fido2-cred-V
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue" | tar -C ${T} -xf-
11}
12
13run() {
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
20case "$1" in
21sync)
22 sync
23 ;;
24run)
25 run
26 exit 0
27 ;;
28*)
29 echo unknown command "$1"
30 exit 1
31esac
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
6T=fuzz_assert
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
11}
12
13run() {
14 build/fuzz/fuzz_assert -max_len=17408 -runs=1 ${T}/corpus \
15 2>/dev/null 1>&2
16}
17
18case "$1" in
19sync)
20 sync
21 ;;
22run)
23 run
24 exit 0
25 ;;
26*)
27 echo unknown command "$1"
28 exit 1
29esac
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
6T=fuzz_bio
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
11}
12
13run() {
14 build/fuzz/fuzz_bio -max_len=17408 -runs=1 ${T}/corpus \
15 2>/dev/null 1>&2
16}
17
18case "$1" in
19sync)
20 sync
21 ;;
22run)
23 run
24 exit 0
25 ;;
26*)
27 echo unknown command "$1"
28 exit 1
29esac
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
6T=fuzz_cred
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
11}
12
13run() {
14 build/fuzz/fuzz_cred -max_len=17408 -runs=1 ${T}/corpus 2>/dev/null 1>&2
15}
16
17case "$1" in
18sync)
19 sync
20 ;;
21run)
22 run
23 exit 0
24 ;;
25*)
26 echo unknown command "$1"
27 exit 1
28esac
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
6T=fuzz_credman
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
11}
12
13run() {
14 build/fuzz/fuzz_credman -max_len=17408 -runs=1 ${T}/corpus 2>/dev/null 1>&2
15}
16
17case "$1" in
18sync)
19 sync
20 ;;
21run)
22 run
23 exit 0
24 ;;
25*)
26 echo unknown command "$1"
27 exit 1
28esac
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
6T=fuzz_mgmt
7
8sync() {
9 mkdir ${T}
10 ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
11}
12
13run() {
14 build/fuzz/fuzz_mgmt -max_len=17408 -runs=1 ${T}/corpus \
15 2>/dev/null 1>&2
16}
17
18case "$1" in
19sync)
20 sync
21 ;;
22run)
23 run
24 exit 0
25 ;;
26*)
27 echo unknown command "$1"
28 exit 1
29esac