Commit Graph

24 Commits

Author SHA1 Message Date
Matt Caswell
55869f594f Test that X509_issuer_and_serial_hash doesn't crash
Provide a certificate with a bad issuer and check that
X509_issuer_and_serial_hash doesn't crash.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
2021-02-16 11:32:32 +00:00
Matt Caswell
61b0fead5e Don't Overflow when printing Thawte Strong Extranet Version
When printing human readable info on the Thawte Strong Extranet extension
the version number could overflow if the version number == LONG_MAX. This
is undefined behaviour.

Issue found by OSSFuzz.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/13452)
2020-12-02 10:28:45 +00:00
Dr. David von Oheimb
e599d0aecd Add CMP fuzzing to fuzz/cmp.c, including a couple of helpers in crypto/cmp/
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11386)
2020-04-18 19:54:17 +02:00
Matt Caswell
aec9667bd1 Don't assume the type we read was the type we expected
i2v_GENERAL_NAME and GENERAL_NAME_print were assuming that the type of
of a GENERAL_NAME (OTHERNAME) that we read in was the type we expected
it to be. If its something else then this can cause unexpected
behaviour. In the added fuzz test case an OOB read was occurring.

This issue was recently added by commit 4baee2d.

Credit to OSSFuzz for finding this issue.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10300)
2019-11-04 12:49:19 +00:00
Kurt Roeckx
0b89db6b2a Update fuzz corpora
Reviewed-by: Tim Hudson <tjh@openssl.org>
GH: #7033
2018-08-23 22:08:08 +02:00
Matt Caswell
273f7fe16a Add fuzz corpora file that found the ASN.1 stack depth issue
Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-03-27 10:22:49 +01:00
Kurt Roeckx
ba24968dd1 Update asn1 and x509 corpora
Reviewed-by: Richard Levitte <levitte@openssl.org>
GH: #4653
2017-11-03 10:58:09 +01:00
Kurt Roeckx
515b124b8b Update fuzz corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #3829
2017-07-02 18:21:19 +02:00
Matt Caswell
8a585601fe Fix out-of-memory condition in conf
conf has the ability to expand variables in config files. Repeatedly doing
this can lead to an exponential increase in the amount of memory required.
This places a limit on the length of a value that can result from an
expansion.

Credit to OSS-Fuzz for finding this problem.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2894)
2017-03-12 00:19:14 +00:00
Kurt Roeckx
9dd4ac8cf1 Update client, server and x509 fuzz corpus
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2682
2017-02-21 18:53:07 +01:00
Kurt Roeckx
d2828c8bdb Update client and server corpus
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2318
2017-01-29 00:59:03 +01:00
Kurt Roeckx
3b72dcd5fb Update fuzz corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2182
2017-01-06 18:27:17 +01:00
Kurt Roeckx
f15eed3b79 Update fuzz corpora
Reviewed-by: Richard Levitte <levitte@openssl.org>
GH: #2090
2016-12-19 00:46:45 +01:00
Kurt Roeckx
6c0e1e20d2 Update client fuzz corpus
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2060
2016-12-09 23:35:06 +01:00
Kurt Roeckx
af5a4b40d7 Update client fuzzer corpus
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2053
2016-12-09 18:13:18 +01:00
Kurt Roeckx
141ecc4e55 Fuzz corpora update
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2041
2016-12-08 19:06:19 +01:00
Kurt Roeckx
c22d64845a Update fuzz corpora
New minimal fuzz corpora set

Reviewed-by: Andy Polyakov <appro@openssl.org>

GH: #1910
2016-11-12 16:54:51 +01:00
Kurt Roeckx
2b687397fd Update fuzz corpora
New minimal fuzz corpora for asn1, asn1parse, bndiv, crl and x509

Reviewed-by: Andy Polyakov <appro@openssl.org>

GH: #1678
2016-10-10 19:31:38 +02:00
Robert Swiecki
44f206aa9d Add to fuzz corpora for CVE-2016-6309
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-09-26 08:52:48 +01:00
Kurt Roeckx
5579eab9ef Update fuzz corpora
This is a new minimal corpus with the following changes:
- asn1: files: 1135 (+474), tuples: 27236 (+7496)
- asn1parse: files: 305 (-3), tuples: 8758 (+11)
- bignum: files: 370 (-1), tuples: 9547 (+10)
- bndiv: files: 160 (+0), tuples: 2416 (+6)
- cms: files: 155 (-1), tuples: 3408 (+0)
- conf: files: 231 (-11), tuples: 4668 (+3)
- crl: files: 905 (+188), tuples: 22876 (+4096)
- ct: files: 117 (+35), tuples: 3557 (+908)
- x509: files: 920, tuples: 28334

Note that tuple count depends on the binary and is random.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-23 20:01:54 +01:00
Kurt Roeckx
f08c8c1a19 Add x509 and crl corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>

GH: #1229
2016-06-25 11:01:29 +02:00
Kurt Roeckx
d0ba3119de Update fuzz corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>

MR: #2986
2016-06-23 15:13:32 +02:00
Kurt Roeckx
2dca984bab Update fuzz corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>

MR: #2949
2016-06-14 19:30:41 +02:00
Ben Laurie
ff2c608bf6 Add fuzz corpora.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-10 13:00:31 +01:00