tests: Add tests against regression for two previously fixed bugs.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 4 Jul 2017 17:13:15 +0000 (13:13 -0400)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 4 Jul 2017 17:13:15 +0000 (13:13 -0400)
tests/automake.mk
tests/data/CVE-2017-10791.sav [new file with mode: 0644]
tests/data/CVE-2017-10792.sav [new file with mode: 0644]
tests/data/sys-file-reader.at

index 0f297f7ca095b2c9853fa392a9fafb90c6980b6c..58d462176249de41a9f705be3075e251668ea764 100644 (file)
@@ -245,6 +245,8 @@ tests_ui_syntax_gen_test_LDADD = \
 
 EXTRA_DIST += \
        tests/coverage.sh \
+       tests/data/CVE-2017-10791.sav \
+       tests/data/CVE-2017-10792.sav \
        tests/data/bcd-in.expected.cmp.gz \
        tests/data/binhex-in.expected.cmp.gz \
        tests/data/binhex-out.expected.gz \
diff --git a/tests/data/CVE-2017-10791.sav b/tests/data/CVE-2017-10791.sav
new file mode 100644 (file)
index 0000000..6462081
Binary files /dev/null and b/tests/data/CVE-2017-10791.sav differ
diff --git a/tests/data/CVE-2017-10792.sav b/tests/data/CVE-2017-10792.sav
new file mode 100644 (file)
index 0000000..e36df43
Binary files /dev/null and b/tests/data/CVE-2017-10792.sav differ
index a00ef2b46ce7a376f48b4ce102a0a996e019fdd7..254de181ecd936fac811433d996718e3dd67175f 100644 (file)
@@ -3873,3 +3873,29 @@ for variant in be le; do
 ])
 done
 AT_CLEANUP
+
+# CVE-2017-10791.
+# See also https://bugzilla.redhat.com/show_bug.cgi?id=1467004.
+# See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890.
+# See also https://security-tracker.debian.org/tracker/CVE-2017-10791.
+# Found by team OWL337, using the collAFL fuzzer.
+AT_SETUP([integer overflows in long string missing values])
+cp $top_srcdir/tests/data/CVE-2017-10791.sav .
+AT_CHECK([pspp-convert -O csv CVE-2017-10791.sav -], [0], [], [dnl
+`CVE-2017-10791.sav': This system file does not indicate its own character encoding.  Using default encoding ANSI_X3.4-1968.  For best results, specify an encoding explicitly.  Use SYSFILE INFO with ENCODING="DETECT" to analyze the possible encodings.
+`CVE-2017-10791.sav' near offset 0x217: Extension record subtype 21 ends unexpectedly.
+])
+AT_CLEANUP
+
+# CVE-2017-10792.
+# See also https://bugzilla.redhat.com/show_bug.cgi?id=1467005.
+# See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890.
+# See also https://security-tracker.debian.org/tracker/CVE-2017-10792.
+# Reported by team OWL337, with fuzzer collAFL.
+AT_SETUP([null dereference skipping bad extension record 18])
+cp $top_srcdir/tests/data/CVE-2017-10792.sav .
+AT_CHECK([pspp-convert -O csv CVE-2017-10792.sav -], [0], [], [dnl
+`CVE-2017-10792.sav' near offset 0x1c0: Record type 7, subtype 18 has bad size 4 (expected 1).
+`CVE-2017-10792.sav': This system file does not indicate its own character encoding.  Using default encoding ANSI_X3.4-1968.  For best results, specify an encoding explicitly.  Use SYSFILE INFO with ENCODING="DETECT" to analyze the possible encodings.
+])
+AT_CLEANUP