openssl/crypto/x509
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
..
build.info X509_LOOKUP_store: new X509_LOOKUP_METHOD that works by OSSL_STORE URI 2019-11-03 18:38:23 +01:00
by_dir.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
by_file.c Reorganize local header files 2019-09-28 20:26:35 +02:00
by_store.c X509_LOOKUP_store: new X509_LOOKUP_METHOD that works by OSSL_STORE URI 2019-11-03 18:38:23 +01:00
ext_dat.h Rename internal function name_cmp() to v3_name_cmp() 2019-10-17 09:16:45 +02:00
pcy_cache.c Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_data.c Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_lib.c Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_local.h Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_map.c Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_node.c Reorganize local header files 2019-09-28 20:26:35 +02:00
pcy_tree.c Fix --strict-warnings build 2019-11-03 16:38:56 +01:00
standard_exts.h
t_crl.c
t_req.c
t_x509.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
v3_addr.c Rename internal function name_cmp() to v3_name_cmp() 2019-10-17 09:16:45 +02:00
v3_admis.c Reorganize public header files (part 1) 2019-09-28 20:26:36 +02:00
v3_admis.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
v3_akey.c
v3_akeya.c
v3_alt.c Don't assume the type we read was the type we expected 2019-11-04 12:49:19 +00:00
v3_asid.c Rename internal function name_cmp() to v3_name_cmp() 2019-10-17 09:16:45 +02:00
v3_bcons.c
v3_bitst.c
v3_conf.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
v3_cpols.c Rename internal function name_cmp() to v3_name_cmp() 2019-10-17 09:16:45 +02:00
v3_crld.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_enum.c
v3_extku.c
v3_genn.c
v3_ia5.c
v3_info.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_int.c
v3_lib.c
v3_ncons.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_pci.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_pcia.c
v3_pcons.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_pku.c
v3_pmaps.c
v3_prn.c
v3_purp.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_skey.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
v3_sxnet.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
v3_tlsf.c
v3_utl.c Rename internal function name_cmp() to v3_name_cmp() 2019-10-17 09:16:45 +02:00
v3err.c
x509_att.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x509_cmp.c Stop using EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 2019-10-11 09:52:31 +02:00
x509_d2.c X509_LOOKUP_store: new X509_LOOKUP_METHOD that works by OSSL_STORE URI 2019-11-03 18:38:23 +01:00
x509_def.c
x509_err.c
x509_ext.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509_local.h Reorganize local header files 2019-09-28 20:26:35 +02:00
x509_lu.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x509_meth.c Reorganize public header files (part 1) 2019-09-28 20:26:36 +02:00
x509_obj.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509_r2x.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509_req.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509_set.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x509_trs.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x509_txt.c
x509_v3.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x509_vfy.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x509_vpm.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x509cset.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509name.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509rset.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x509spki.c
x509type.c
x_all.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x_attrib.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x_crl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x_exten.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x_name.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x_pubkey.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x_req.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x_x509.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x_x509a.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00