Commit 7f68f950 authored by metzman's avatar metzman Committed by Commit bot

Change pdf/pdfium/fuzzers/BUILD.gn to use dicts and seed corpora

Add dictionaries and seed corpora from AFL.
All of the additions were shown to significantly help afl-fuzz fuzz the target fuzzers.

BUG=611337

Review-Url: https://codereview.chromium.org/2168263005
Cr-Commit-Position: refs/heads/master@{#407292}
parent 80ef5237
......@@ -33,6 +33,7 @@ fuzzer_test("pdf_jpx_fuzzer") {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_jpx_fuzzer",
]
seed_corpus = "corpora/pdf_jpx"
}
if (pdf_enable_xfa) {
......@@ -41,6 +42,7 @@ if (pdf_enable_xfa) {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_codec_bmp_fuzzer",
]
seed_corpus = "corpora/pdf_codec_bmp"
}
fuzzer_test("pdf_codec_gif_fuzzer") {
......@@ -48,6 +50,8 @@ if (pdf_enable_xfa) {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_codec_gif_fuzzer",
]
dict = "dicts/pdf_codec_gif.dict"
seed_corpus = "corpora/pdf_codec_gif"
}
fuzzer_test("pdf_codec_jpeg_fuzzer") {
......@@ -55,6 +59,8 @@ if (pdf_enable_xfa) {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_codec_jpeg_fuzzer",
]
dict = "dicts/pdf_codec_jpeg.dict"
seed_corpus = "corpora/pdf_codec_jpeg"
}
fuzzer_test("pdf_codec_png_fuzzer") {
......@@ -62,6 +68,8 @@ if (pdf_enable_xfa) {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_codec_png_fuzzer",
]
dict = "dicts/pdf_codec_png.dict"
seed_corpus = "corpora/pdf_codec_png"
}
fuzzer_test("pdf_codec_tiff_fuzzer") {
......@@ -69,6 +77,8 @@ if (pdf_enable_xfa) {
deps = [
"//third_party/pdfium/testing/libfuzzer:pdf_codec_tiff_fuzzer",
]
dict = "dicts/pdf_codec_tiff.dict"
seed_corpus = "corpora/pdf_codec_tiff"
}
fuzzer_test("pdf_css_fuzzer") {
......
#
# AFL dictionary for GIF images
# -----------------------------
#
# Created by Michal Zalewski <lcamtuf@google.com>
#
header_87a="87a"
header_89a="89a"
header_gif="GIF"
marker_2c=","
marker_3b=";"
section_2101="!\x01\x12"
section_21f9="!\xf9\x04"
section_21fe="!\xfe"
section_21ff="!\xff\x11"
#
# AFL dictionary for JPEG images
# ------------------------------
#
# Created by Michal Zalewski <lcamtuf@google.com>
#
header_jfif="JFIF\x00"
header_jfxx="JFXX\x00"
section_ffc0="\xff\xc0"
section_ffc2="\xff\xc2"
section_ffc4="\xff\xc4"
section_ffd0="\xff\xd0"
section_ffd8="\xff\xd8"
section_ffd9="\xff\xd9"
section_ffda="\xff\xda"
section_ffdb="\xff\xdb"
section_ffdd="\xff\xdd"
section_ffe0="\xff\xe0"
section_ffe1="\xff\xe1"
section_fffe="\xff\xfe"
#
# AFL dictionary for PNG images
# -----------------------------
#
# Just the basic, standard-originating sections; does not include vendor
# extensions.
#
# Created by Michal Zalewski <lcamtuf@google.com>
#
header_png="\x89PNG\x0d\x0a\x1a\x0a"
section_IDAT="IDAT"
section_IEND="IEND"
section_IHDR="IHDR"
section_PLTE="PLTE"
section_bKGD="bKGD"
section_cHRM="cHRM"
section_fRAc="fRAc"
section_gAMA="gAMA"
section_gIFg="gIFg"
section_gIFt="gIFt"
section_gIFx="gIFx"
section_hIST="hIST"
section_iCCP="iCCP"
section_iTXt="iTXt"
section_oFFs="oFFs"
section_pCAL="pCAL"
section_pHYs="pHYs"
section_sBIT="sBIT"
section_sCAL="sCAL"
section_sPLT="sPLT"
section_sRGB="sRGB"
section_sTER="sTER"
section_tEXt="tEXt"
section_tIME="tIME"
section_tRNS="tRNS"
section_zTXt="zTXt"
#
# AFL dictionary for TIFF images
# ------------------------------
#
# Just the basic, standard-originating sections; does not include vendor
# extensions.
#
# Created by Michal Zalewski <lcamtuf@google.com>
#
header_ii="II*\x00"
header_mm="MM\x00*"
section_100="\x00\x01"
section_101="\x01\x01"
section_102="\x02\x01"
section_103="\x03\x01"
section_106="\x06\x01"
section_107="\x07\x01"
section_10D="\x0d\x01"
section_10E="\x0e\x01"
section_10F="\x0f\x01"
section_110="\x10\x01"
section_111="\x11\x01"
section_112="\x12\x01"
section_115="\x15\x01"
section_116="\x16\x01"
section_117="\x17\x01"
section_11A="\x1a\x01"
section_11B="\x1b\x01"
section_11C="\x1c\x01"
section_11D="\x1d\x01"
section_11E="\x1e\x01"
section_11F="\x1f\x01"
section_122="\"\x01"
section_123="#\x01"
section_124="$\x01"
section_125="%\x01"
section_128="(\x01"
section_129=")\x01"
section_12D="-\x01"
section_131="1\x01"
section_132="2\x01"
section_13B=";\x01"
section_13C="<\x01"
section_13D="=\x01"
section_13E=">\x01"
section_13F="?\x01"
section_140="@\x01"
section_FE="\xfe\x00"
section_FF="\xff\x00"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment