summaryrefslogtreecommitdiffstats
path: root/test/fuzz/fuzz-bootspec
diff options
context:
space:
mode:
Diffstat (limited to 'test/fuzz/fuzz-bootspec')
-rw-r--r--test/fuzz/fuzz-bootspec/crash-autoentry21
-rw-r--r--test/fuzz/fuzz-bootspec/crash-empty-value1
-rw-r--r--test/fuzz/fuzz-bootspec/crash-json-dispatch1
-rw-r--r--test/fuzz/fuzz-bootspec/oss-fuzz-535781
-rw-r--r--test/fuzz/fuzz-bootspec/sample122
-rw-r--r--test/fuzz/fuzz-bootspec/sanitizer-overload1
6 files changed, 47 insertions, 0 deletions
diff --git a/test/fuzz/fuzz-bootspec/crash-autoentry b/test/fuzz/fuzz-bootspec/crash-autoentry
new file mode 100644
index 0000000..04d78ef
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/crash-autoentry
@@ -0,0 +1,21 @@
+{
+ "config": "timeout 3\nconsole-mode 2\n# default 08a5690afeedfeedaaac0a5d2e3cf6b0-*\n# default auto-reboot-to-firmware-setup\n",
+ "entries": [
+ [
+ "08a5690afeedfeedaaac0a5d2e3cf6b0-5.15.14-200.fc35.x86_64.conf",
+ "title Fedora Linux 35 (Workstation Edition)\nversion 5.15.14-200.fc35.x86_64\nmachine-id 08a5690afeedfeedaaac0a5d2e3cf6b0\noptions root=/dev/mapper/fedora_krowka-root rw rd.lvm.lv=fedora_krowka/root rd.luks.uuid=luks-2d9b648a-15b1-4204-988b-ec085089f8ce rd.lvm.lv=fedora_krowka/swap LANG=en_US.UTF-8 selinux=0 resume=/dev/mapper/fedora_krowka-swap systemd.show-status systemd.unit-status-format=name quiet\nlinux /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/linux\ninitrd /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/initrd\n"
+ ],
+ [
+ "08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf",
+ "title Fedora Linux 36 (Workstation Edition Prerelease)\nversion 5.17.0-0.rc5.102.fc36.x86_64\nmachine-id 08a5690afeedfeedaaac0a5d2e3cf6b0\noptions root=/dev/mapper/fedora_krowka-root rw rd.lvm.lv=fedora_krowka/root rd.luks.uuid=luks-2d9b648a-15b1-4204-988b-ec085089f8ce rd.lvm.lv=fedora_krowka/swap LANG=en_US.UTF-8 selinux=0 resume=/dev/mapper/fedora_krowka-swap systemd.show-status systemd.unit-status-format=name quiet\nlinux /08a5690afeedfeedaaac0a5d2e3cf6b0/5.17.0-0.rc5.102.fc36.x86_64/linux\ninitrd /08a5690afeedfeedaaac0a5d2e3cf6b0/5.17.0-0.rc5.102.fc36.x86_64/initrd\n"
+ ],
+ [
+ "listing.conf",
+ "title Title\nversion 3.7.2-201.fc18.x86_64\nmachine-id 4098b3f648d74c13b1f04ccfba7798e8\nsort-key 666\nlinux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux\ninitrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd\nefi /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/efi\noptions one two three four\ndevicetree 6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb\ndevicetree-overlay /6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_A.dtbo /6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_B.dtbo\narchitecture IA32\narchitecture x64\narchitecture IA64\narchitecture ARM\narchitecture AA64\n"
+ ]
+ ],
+ "loader": [
+ "08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf",
+ "08a5690afeedfeedaaac0a5d2e3cfkstation Edition Prereleaa_krowse)\nversion 5.17.0-0.rc5.102.fc36.xtup"
+ ]
+}
diff --git a/test/fuzz/fuzz-bootspec/crash-empty-value b/test/fuzz/fuzz-bootspec/crash-empty-value
new file mode 100644
index 0000000..5436e44
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/crash-empty-value
@@ -0,0 +1 @@
+{"config": "timeout 3\nconsole-mode 2\n# default 08a5690afeedfeedaaac0a5d2e3cf6b0-*\n# default auto-reboot-to-firmware-set*up\n", "entries": [["08a5690afeedfeedaaac0a5d2e3cf6b0-5.15.14-200.fc35.x86_64.conf", "title Fedora Linux 35 (Workstation Edition)\nversio' 5.15.14-200.fc35.x86_64\nmachine-id 08a5690afeedfeedaaac0a5d2e3cf6b0\noptions root=/dev/mapper/fedora_krowka-root rw rd.lvm.lv=fedora_krowka/root rd.luks.uuid=luks-2d9b648a-15b1-4204-988b-ec085085f8ce rd.lvm.lv=fedora_krowka/swap LANG=en_US.UTF-8 selinux=0 resume='dev/mapper/fedora_krowka-swap systemd.show-status systemd.unit-status-format=name quiet\nlinux /08a5690md.unit-status-format=name quiet\nlinux /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/linux\ninitrd /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/titled\n"], ["08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.47cf92ac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf", "title Fedora Lin38 6724b7a987ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb\ndevicetree-overlay ", "title Fedora Lin3x 6724b7a987ebb5b8495_64/initrd\n"], ["08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf", "title Fedora Lin3x 6724b7a987ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb\ndevicetree-overlay /6a9857a393'24b7a981ebb5b8495b9ea/overlays/overlay_A.dtbo /6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_B.dtbo\narchitecture IA32\narchitecture x64\narchitecture IA64\narcetithcure ARM\narchitecture AA64\n"]]}
diff --git a/test/fuzz/fuzz-bootspec/crash-json-dispatch b/test/fuzz/fuzz-bootspec/crash-json-dispatch
new file mode 100644
index 0000000..fc2f090
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/crash-json-dispatch
@@ -0,0 +1 @@
+{"config": "timeout ,3\nconsole-mode 2\n#o-firmwapa-setup\n", "entries": [["08a5690afeedfeedaaac0a5d2e3cf6b0-5.15.14mapper/fedod47cf92ac0a\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\3d2e5cf6b0/5.17.0-0.rc5.102.fc3uie4/initrd\n"], ["08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.0-0.rc5.102.86_64/initrd\n"], ["08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.WSL.rc5.102.fc36.x86_64.conf", "title Fedora Lays/overlay_A.dtbo nux /6a9857a393724b7a981eb-15b1-420ition)\nversioedod47cf92ac0a\\\\\\null\\\\\\\\\\\rmv7h)/tegra20-paz00.dtb\ndevicetree-overlay /6/9857a393'24b7a981ebb5ersioedod47cf92ac0a\\\\\\null\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\3d2earchb05/.17.0-0.rc5.102.fc3uiet\nlinux /0iet\nlinux /08a5690afeedfeedaaac0a5d2e3085089fdora Linux 35 (Workstationlirchitecture AA64\n"]]}
diff --git a/test/fuzz/fuzz-bootspec/oss-fuzz-53578 b/test/fuzz/fuzz-bootspec/oss-fuzz-53578
new file mode 100644
index 0000000..8804abd
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/oss-fuzz-53578
@@ -0,0 +1 @@
+{"config":"default @saved","loader":[""]} \ No newline at end of file
diff --git a/test/fuzz/fuzz-bootspec/sample1 b/test/fuzz/fuzz-bootspec/sample1
new file mode 100644
index 0000000..1231c86
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/sample1
@@ -0,0 +1,22 @@
+{
+ "config": "timeout 3\nconsole-mode 2\n# default 08a5690afeedfeedaaac0a5d2e3cf6b0-*\n# default auto-reboot-to-firmware-setup\n",
+ "entries": [
+ [
+ "08a5690afeedfeedaaac0a5d2e3cf6b0-5.15.14-200.fc35.x86_64.conf",
+ "title Fedora Linux 35 (Workstation Edition)\nversion 5.15.14-200.fc35.x86_64\nmachine-id 08a5690afeedfeedaaac0a5d2e3cf6b0\noptions root=/dev/mapper/fedora_krowka-root rw rd.lvm.lv=fedora_krowka/root rd.luks.uuid=luks-2d9b648a-15b1-4204-988b-ec085089f8ce rd.lvm.lv=fedora_krowka/swap LANG=en_US.UTF-8 selinux=0 resume=/dev/mapper/fedora_krowka-swap systemd.show-status systemd.unit-status-format=name quiet\nlinux /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/linux\ninitrd /08a5690afeedfeedaaac0a5d2e3cf6b0/5.15.14-200.fc35.x86_64/initrd\n"
+ ],
+ [
+ "08a5690afeedfeedaaac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf",
+ "title Fedora Linux 36 (Workstation Edition Prerelease)\nversion 5.17.0-0.rc5.102.fc36.x86_64\nmachine-id 08a5690afeedfeedaaac0a5d2e3cf6b0\noptions root=/dev/mapper/fedora_krowka-root rw rd.lvm.lv=fedora_krowka/root rd.luks.uuid=luks-2d9b648a-15b1-4204-988b-ec085089f8ce rd.lvm.lv=fedora_krowka/swap LANG=en_US.UTF-8 selinux=0 resume=/dev/mapper/fedora_krowka-swap systemd.show-status systemd.unit-status-format=name quiet\nlinux /08a5690afeedfeedaaac0a5d2e3cf6b0/5.17.0-0.rc5.102.fc36.x86_64/linux\ninitrd /08a5690afeedfeedaaac0a5d2e3cf6b0/5.17.0-0.rc5.102.fc36.x86_64/initrd\n"
+ ],
+ [
+ "listing.conf",
+ "title Title\nversion 3.7.2-201.fc18.x86_64\nmachine-id 4098b3f648d74c13b1f04ccfba7798e8\nsort-key 666\nlinux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux\ninitrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd\nefi /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/efi\noptions one two three four\ndevicetree 6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb\ndevicetree-overlay /6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_A.dtbo /6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_B.dtbo\narchitecture IA32\narchitecture x64\narchitecture IA64\narchitecture ARM\narchitecture AA64\n"
+ ]
+ ],
+ "loader": [
+ "08a5690a2eed47cf92ac0a5d2e3cf6b0-5.17.0-0.rc5.102.fc36.x86_64.conf",
+ "08a5690a2eed47cf92ac0a5d2e3cf6b0-5.15.14-200.fc35.x86_64.conf",
+ "auto-reboot-to-firmware-setup"
+ ]
+}
diff --git a/test/fuzz/fuzz-bootspec/sanitizer-overload b/test/fuzz/fuzz-bootspec/sanitizer-overload
new file mode 100644
index 0000000..b95df60
--- /dev/null
+++ b/test/fuzz/fuzz-bootspec/sanitizer-overload
@@ -0,0 +1 @@
+{"loader":[""]} \ No newline at end of file