From 392ce7db1eccf5e2eacb074195ea7f5016f70259 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 2 Aug 2015 23:43:12 -0400 Subject: Fix two crashes in the BER decoder found with afl. One a read at 0 of an empty vector, the other causing allocation of an arbitrary amount of memory. --- src/tests/data/fuzz/x509/afl_000.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_001.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_002.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_003.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_004.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_005.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_006.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_007.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_008.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_009.pem | 14 +++++++++ src/tests/data/fuzz/x509/afl_010.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_011.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_012.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_013.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_014.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_015.pem | 5 +++ src/tests/data/fuzz/x509/afl_016.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_017.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_018.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_019.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_020.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_021.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_022.pem | 12 +++++++ src/tests/data/fuzz/x509/afl_023.pem | 13 ++++++++ src/tests/data/fuzz/x509/afl_024.pem | 3 ++ src/tests/data/fuzz/x509/afl_025.pem | 3 ++ src/tests/data/fuzz/x509/afl_026.pem | Bin 0 -> 35 bytes src/tests/data/fuzz/x509/afl_027.pem | Bin 0 -> 10 bytes src/tests/data/fuzz/x509/afl_028.pem | Bin 0 -> 22 bytes src/tests/data/fuzz/x509/afl_029.pem | Bin 0 -> 60 bytes src/tests/data/fuzz/x509/afl_030.pem | 1 + src/tests/data/fuzz/x509/afl_031.pem | 1 + src/tests/data/fuzz/x509/afl_032.pem | Bin 0 -> 134 bytes src/tests/data/fuzz/x509/afl_033.pem | Bin 0 -> 134 bytes src/tests/data/fuzz/x509/afl_034.pem | 4 +++ src/tests/data/fuzz/x509/afl_035.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_036.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_037.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_038.pem | Bin 0 -> 634 bytes src/tests/data/fuzz/x509/afl_039.pem | Bin 0 -> 631 bytes src/tests/data/fuzz/x509/afl_040.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_041.pem | Bin 0 -> 637 bytes src/tests/data/fuzz/x509/afl_042.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_043.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_044.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_045.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_046.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_047.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_048.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_049.pem | Bin 0 -> 639 bytes src/tests/data/fuzz/x509/afl_050.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_051.pem | Bin 0 -> 624 bytes src/tests/data/fuzz/x509/afl_052.pem | Bin 0 -> 624 bytes src/tests/test_fuzz.cpp | 59 +++++++++++++++++++++++++++++++++++ src/tests/tests.cpp | 1 + src/tests/tests.h | 2 ++ 56 files changed, 378 insertions(+) create mode 100644 src/tests/data/fuzz/x509/afl_000.pem create mode 100644 src/tests/data/fuzz/x509/afl_001.pem create mode 100644 src/tests/data/fuzz/x509/afl_002.pem create mode 100644 src/tests/data/fuzz/x509/afl_003.pem create mode 100644 src/tests/data/fuzz/x509/afl_004.pem create mode 100644 src/tests/data/fuzz/x509/afl_005.pem create mode 100644 src/tests/data/fuzz/x509/afl_006.pem create mode 100644 src/tests/data/fuzz/x509/afl_007.pem create mode 100644 src/tests/data/fuzz/x509/afl_008.pem create mode 100644 src/tests/data/fuzz/x509/afl_009.pem create mode 100644 src/tests/data/fuzz/x509/afl_010.pem create mode 100644 src/tests/data/fuzz/x509/afl_011.pem create mode 100644 src/tests/data/fuzz/x509/afl_012.pem create mode 100644 src/tests/data/fuzz/x509/afl_013.pem create mode 100644 src/tests/data/fuzz/x509/afl_014.pem create mode 100644 src/tests/data/fuzz/x509/afl_015.pem create mode 100644 src/tests/data/fuzz/x509/afl_016.pem create mode 100644 src/tests/data/fuzz/x509/afl_017.pem create mode 100644 src/tests/data/fuzz/x509/afl_018.pem create mode 100644 src/tests/data/fuzz/x509/afl_019.pem create mode 100644 src/tests/data/fuzz/x509/afl_020.pem create mode 100644 src/tests/data/fuzz/x509/afl_021.pem create mode 100644 src/tests/data/fuzz/x509/afl_022.pem create mode 100644 src/tests/data/fuzz/x509/afl_023.pem create mode 100644 src/tests/data/fuzz/x509/afl_024.pem create mode 100644 src/tests/data/fuzz/x509/afl_025.pem create mode 100644 src/tests/data/fuzz/x509/afl_026.pem create mode 100644 src/tests/data/fuzz/x509/afl_027.pem create mode 100644 src/tests/data/fuzz/x509/afl_028.pem create mode 100644 src/tests/data/fuzz/x509/afl_029.pem create mode 100644 src/tests/data/fuzz/x509/afl_030.pem create mode 100644 src/tests/data/fuzz/x509/afl_031.pem create mode 100644 src/tests/data/fuzz/x509/afl_032.pem create mode 100644 src/tests/data/fuzz/x509/afl_033.pem create mode 100644 src/tests/data/fuzz/x509/afl_034.pem create mode 100644 src/tests/data/fuzz/x509/afl_035.pem create mode 100644 src/tests/data/fuzz/x509/afl_036.pem create mode 100644 src/tests/data/fuzz/x509/afl_037.pem create mode 100644 src/tests/data/fuzz/x509/afl_038.pem create mode 100644 src/tests/data/fuzz/x509/afl_039.pem create mode 100644 src/tests/data/fuzz/x509/afl_040.pem create mode 100644 src/tests/data/fuzz/x509/afl_041.pem create mode 100644 src/tests/data/fuzz/x509/afl_042.pem create mode 100644 src/tests/data/fuzz/x509/afl_043.pem create mode 100644 src/tests/data/fuzz/x509/afl_044.pem create mode 100644 src/tests/data/fuzz/x509/afl_045.pem create mode 100644 src/tests/data/fuzz/x509/afl_046.pem create mode 100644 src/tests/data/fuzz/x509/afl_047.pem create mode 100644 src/tests/data/fuzz/x509/afl_048.pem create mode 100644 src/tests/data/fuzz/x509/afl_049.pem create mode 100644 src/tests/data/fuzz/x509/afl_050.pem create mode 100644 src/tests/data/fuzz/x509/afl_051.pem create mode 100644 src/tests/data/fuzz/x509/afl_052.pem create mode 100644 src/tests/test_fuzz.cpp (limited to 'src/tests') diff --git a/src/tests/data/fuzz/x509/afl_000.pem b/src/tests/data/fuzz/x509/afl_000.pem new file mode 100644 index 000000000..5bd3a97d0 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_000.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIEYMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_001.pem b/src/tests/data/fuzz/x509/afl_001.pem new file mode 100644 index 000000000..9bf1fcecb --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_001.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MICzAJBGCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_002.pem b/src/tests/data/fuzz/x509/afl_002.pem new file mode 100644 index 000000000..fbadfd772 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_002.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4EAABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_003.pem b/src/tests/data/fuzz/x509/afl_003.pem new file mode 100644 index 000000000..86041ccfd --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_003.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgOjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWzXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_004.pem b/src/tests/data/fuzz/x509/afl_004.pem new file mode 100644 index 000000000..4c818d9c3 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_004.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4EAADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_005.pem b/src/tests/data/fuzz/x509/afl_005.pem new file mode 100644 index 000000000..fa101ff3a --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_005.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICATECCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1uEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_006.pem b/src/tests/data/fuzz/x509/afl_006.pem new file mode 100644 index 000000000..af95cabfb --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_006.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCCqGSIb9ycEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG6yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAU4AwAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_007.pem b/src/tests/data/fuzz/x509/afl_007.pem new file mode 100644 index 000000000..30145a8fa --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_007.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICAIN CAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_008.pem b/src/tests/data/fuzz/x509/afl_008.pem new file mode 100644 index 000000000..5be654ce4 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_008.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMfAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIEYMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_009.pem b/src/tests/data/fuzz/x509/afl_009.pem new file mode 100644 index 000000000..7434298ea --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_009.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MICATECCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhUgQ3liZXJU +cnVzdcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_010.pem b/src/tests/data/fuzz/x509/afl_010.pem new file mode 100644 index 000000000..2640094e5 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_010.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAAIGHADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwADAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_011.pem b/src/tests/data/fuzz/x509/afl_011.pem new file mode 100644 index 000000000..176669d6d --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_011.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICATECCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTA0GCSqGSIb3DQEBBAUAMEUxCMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OT1wWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXvcmApy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_012.pem b/src/tests/data/fuzz/x509/afl_012.pem new file mode 100644 index 000000000..baf1a7786 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_012.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICATECCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OPI2PnPfMD+fQ2qLTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAFMQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_013.pem b/src/tests/data/fuzz/x509/afl_013.pem new file mode 100644 index 000000000..bbb050f76 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_013.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICATECCAWMCAgGjMA0GCSqGAMTE0dURSBDeWJlcXRydXN0ISIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlcXRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor7M4sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9t1tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_014.pem b/src/tests/data/fuzz/x509/afl_014.pem new file mode 100644 index 000000000..b68d8c8e2 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_014.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCATDKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_015.pem b/src/tests/data/fuzz/x509/afl_015.pem new file mode 100644 index 000000000..ea8638e31 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_015.pem @@ -0,0 +1,5 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVgYD +VQQKEw9HVEUgQ29ycG9yYX===============================lR===============================ydXN0IFJv +b3QwHhcNOTYwMY +-----END CEc \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_016.pem b/src/tests/data/fuzz/x509/afl_016.pem new file mode 100644 index 000000000..3bd2fc312 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_016.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIBBAUAMEUxCCATEgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBHeFhVYAA1DeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPm1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAO4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1LvZ46WXTeorKeDWanOB5rCJo9Px4KWl +IjeaY8JIILTbcRPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_017.pem b/src/tests/data/fuzz/x509/afl_017.pem new file mode 100644 index 000000000..6ec87b82b --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_017.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIBBAUAMEUxCCATEgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMpK+ULjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPm1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAO4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5rCJo9Px4KWl +IjeaY8JIILTbcRPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_018.pem b/src/tests/data/fuzz/x509/afl_018.pem new file mode 100644 index 000000000..be7ecaec6 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_018.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKAgQc45k+625h8BSb2 +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_019.pem b/src/tests/data/fuzz/x509/afl_019.pem new file mode 100644 index 000000000..d0603430f --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_019.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xgDCERTNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQA45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_020.pem b/src/tests/data/fuzz/x509/afl_020.pem new file mode 100644 index 000000000..10cba363d --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_020.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MICfMA0GCSqGSIb3DQEBAQUAA4RHADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_021.pem b/src/tests/data/fuzz/x509/afl_021.pem new file mode 100644 index 000000000..5e861a5aa --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_021.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCZgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAlWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46-----BKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_022.pem b/src/tests/data/fuzz/x509/afl_022.pem new file mode 100644 index 000000000..7ffa58208 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_022.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUKQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4BSb2CBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt CERTiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_023.pem b/src/tests/data/fuzz/x509/afl_023.pem new file mode 100644 index 000000000..ace8de7a1 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_023.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MICAgECCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4RBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_024.pem b/src/tests/data/fuzz/x509/afl_024.pem new file mode 100644 index 000000000..57243fc2e --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_024.pem @@ -0,0 +1,3 @@ +0€q„- +MIIvLmCCAW]C---BE˙˙˙CERT--- +MIIvcmCCAW]C \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_025.pem b/src/tests/data/fuzz/x509/afl_025.pem new file mode 100644 index 000000000..f1e877697 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_025.pem @@ -0,0 +1,3 @@ +0€q„- +MIIfLm CAW]C--€˙˙˙mCCAW-BE˙˙—˙CERT-#- +MIIvGmCCAW]C \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_026.pem b/src/tests/data/fuzz/x509/afl_026.pem new file mode 100644 index 000000000..899e1d71d Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_026.pem differ diff --git a/src/tests/data/fuzz/x509/afl_027.pem b/src/tests/data/fuzz/x509/afl_027.pem new file mode 100644 index 000000000..8504c3d8c Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_027.pem differ diff --git a/src/tests/data/fuzz/x509/afl_028.pem b/src/tests/data/fuzz/x509/afl_028.pem new file mode 100644 index 000000000..d4f588112 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_028.pem differ diff --git a/src/tests/data/fuzz/x509/afl_029.pem b/src/tests/data/fuzz/x509/afl_029.pem new file mode 100644 index 000000000..59591e0b8 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_029.pem differ diff --git a/src/tests/data/fuzz/x509/afl_030.pem b/src/tests/data/fuzz/x509/afl_030.pem new file mode 100644 index 000000000..be3106dcc --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_030.pem @@ -0,0 +1 @@ +0€‚„‚----BcCAWqG \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_031.pem b/src/tests/data/fuzz/x509/afl_031.pem new file mode 100644 index 000000000..1bdb26461 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_031.pem @@ -0,0 +1 @@ +0€q„BEG„„„IIčm8CAW]C \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_032.pem b/src/tests/data/fuzz/x509/afl_032.pem new file mode 100644 index 000000000..436f7ce70 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_032.pem differ diff --git a/src/tests/data/fuzz/x509/afl_033.pem b/src/tests/data/fuzz/x509/afl_033.pem new file mode 100644 index 000000000..f1aa4028e Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_033.pem differ diff --git a/src/tests/data/fuzz/x509/afl_034.pem b/src/tests/data/fuzz/x509/afl_034.pem new file mode 100644 index 000000000..11c8448d0 --- /dev/null +++ b/src/tests/data/fuzz/x509/afl_034.pem @@ -0,0 +1,4 @@ +-----BEGIN CERTIFICATE----- +MIBBAUAMEUxCzAJBgNoBAYTAlVTMRgwFgYT +VQQKEw9HVEUgQ29ycG9yYXRpb24xHXY +-----END CERTIFICATE-----DA \ No newline at end of file diff --git a/src/tests/data/fuzz/x509/afl_035.pem b/src/tests/data/fuzz/x509/afl_035.pem new file mode 100644 index 000000000..1ff6f1f71 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_035.pem differ diff --git a/src/tests/data/fuzz/x509/afl_036.pem b/src/tests/data/fuzz/x509/afl_036.pem new file mode 100644 index 000000000..8171e93c9 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_036.pem differ diff --git a/src/tests/data/fuzz/x509/afl_037.pem b/src/tests/data/fuzz/x509/afl_037.pem new file mode 100644 index 000000000..f3f4403b9 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_037.pem differ diff --git a/src/tests/data/fuzz/x509/afl_038.pem b/src/tests/data/fuzz/x509/afl_038.pem new file mode 100644 index 000000000..bfdd13e44 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_038.pem differ diff --git a/src/tests/data/fuzz/x509/afl_039.pem b/src/tests/data/fuzz/x509/afl_039.pem new file mode 100644 index 000000000..9e888f879 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_039.pem differ diff --git a/src/tests/data/fuzz/x509/afl_040.pem b/src/tests/data/fuzz/x509/afl_040.pem new file mode 100644 index 000000000..dbde6a784 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_040.pem differ diff --git a/src/tests/data/fuzz/x509/afl_041.pem b/src/tests/data/fuzz/x509/afl_041.pem new file mode 100644 index 000000000..5405ae442 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_041.pem differ diff --git a/src/tests/data/fuzz/x509/afl_042.pem b/src/tests/data/fuzz/x509/afl_042.pem new file mode 100644 index 000000000..6862f605a Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_042.pem differ diff --git a/src/tests/data/fuzz/x509/afl_043.pem b/src/tests/data/fuzz/x509/afl_043.pem new file mode 100644 index 000000000..56b0ddead Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_043.pem differ diff --git a/src/tests/data/fuzz/x509/afl_044.pem b/src/tests/data/fuzz/x509/afl_044.pem new file mode 100644 index 000000000..c250a4c73 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_044.pem differ diff --git a/src/tests/data/fuzz/x509/afl_045.pem b/src/tests/data/fuzz/x509/afl_045.pem new file mode 100644 index 000000000..d3d2fbb7f Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_045.pem differ diff --git a/src/tests/data/fuzz/x509/afl_046.pem b/src/tests/data/fuzz/x509/afl_046.pem new file mode 100644 index 000000000..0c65e9a45 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_046.pem differ diff --git a/src/tests/data/fuzz/x509/afl_047.pem b/src/tests/data/fuzz/x509/afl_047.pem new file mode 100644 index 000000000..9e1ad3030 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_047.pem differ diff --git a/src/tests/data/fuzz/x509/afl_048.pem b/src/tests/data/fuzz/x509/afl_048.pem new file mode 100644 index 000000000..e7f577414 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_048.pem differ diff --git a/src/tests/data/fuzz/x509/afl_049.pem b/src/tests/data/fuzz/x509/afl_049.pem new file mode 100644 index 000000000..60a5b63bd Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_049.pem differ diff --git a/src/tests/data/fuzz/x509/afl_050.pem b/src/tests/data/fuzz/x509/afl_050.pem new file mode 100644 index 000000000..2407ec731 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_050.pem differ diff --git a/src/tests/data/fuzz/x509/afl_051.pem b/src/tests/data/fuzz/x509/afl_051.pem new file mode 100644 index 000000000..c6f0bf36f Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_051.pem differ diff --git a/src/tests/data/fuzz/x509/afl_052.pem b/src/tests/data/fuzz/x509/afl_052.pem new file mode 100644 index 000000000..3f2b126f6 Binary files /dev/null and b/src/tests/data/fuzz/x509/afl_052.pem differ diff --git a/src/tests/test_fuzz.cpp b/src/tests/test_fuzz.cpp new file mode 100644 index 000000000..f53994c26 --- /dev/null +++ b/src/tests/test_fuzz.cpp @@ -0,0 +1,59 @@ +/* +* (C) 2015 Jack Lloyd +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +namespace { + +size_t test_x509_fuzz() + { + const std::string fuzz_data = TEST_DATA_DIR "/fuzz"; + + size_t tests = 0, fails = 0; + + for(auto vec: Botan::get_files_recursive(fuzz_data + "/x509")) + { + ++tests; + + auto start = std::chrono::system_clock::now(); + try + { + // TODO: check for memory consumption? + Botan::X509_Certificate cert(vec); + } + catch(std::exception& e) + { + //std::cout << e.what() << "\n"; + } + auto end = std::chrono::system_clock::now(); + + uint64_t duration = std::chrono::duration_cast(end - start).count(); + + if(duration > 100) + { + std::cout << "Fuzz test " << vec << " took " << duration << " ms\n"; + } + } + + test_report("Fuzz Checks", tests, fails); + + return fails; + } + +} + +size_t test_fuzzer() + { + size_t fails = 0; + fails += test_x509_fuzz(); + return fails; + } diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index a0fd17879..63e6761ac 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -312,6 +312,7 @@ int main(int argc, char* argv[]) DEF_TEST(nist_x509); DEF_TEST(tls); DEF_TEST(compression); + DEF_TEST(fuzzer); if(tests.empty()) { diff --git a/src/tests/tests.h b/src/tests/tests.h index c99adf6b8..88102f289 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -107,6 +107,8 @@ size_t test_nist_x509(); size_t test_srp6(); size_t test_compression(); +size_t test_fuzzer(); + #define SKIP_TEST(testname) \ size_t test_ ## testname() { \ std::cout << "Skipping tests: " << # testname << std::endl; \ -- cgit v1.2.3