openssl/crypto/objects
Hanno Böck 2b8dc08b74 Call of memcmp with null pointers in obj_cmp()
The function obj_cmp() (file crypto/objects/obj_dat.c) can in some
situations call memcmp() with a null pointer and a zero length.

This is invalid behaviour. When compiling openssl with undefined
behaviour sanitizer (add -fsanitize=undefined to compile flags) this
can be seen. One example that triggers this behaviour is the pkcs7
command (but there are others, e.g. I've seen it with the timestamp
function):
apps/openssl pkcs7 -in test/testp7.pem

What happens is that obj_cmp takes objects of the type ASN1_OBJECT and
passes their ->data pointer to memcmp. Zero-sized ASN1_OBJECT
structures can have a null pointer as data.

RT#3816

Signed-off-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-13 15:23:57 +01:00
..
Makefile Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
o_names.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
obj_dat.c Call of memcmp with null pointers in obj_cmp() 2015-05-13 15:23:57 +01:00
obj_dat.h make update 2015-05-05 21:49:51 +02:00
obj_dat.pl Fix OID encoding for one component. 2014-06-27 14:35:07 +01:00
obj_err.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
obj_lib.c free null cleanup finale 2015-05-01 10:02:07 -04:00
obj_mac.num Add more Camellia OIDs. 2015-02-11 20:28:47 +01:00
obj_xref.c Make sig_app, sigx_app static 2015-05-06 16:49:10 -04:00
obj_xref.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
obj_xref.txt Add new OIDs from RFC5753 2013-07-17 21:45:00 +01:00
objects.pl Bring objects.pl output even closer to new format. 2015-02-09 15:59:09 +01:00
objects.README I got sick and tired of having to keep track of NIDs when such a thing 2000-07-05 02:45:36 +00:00
objects.txt ZLIB compression deserves a better comment 2015-05-06 02:07:58 +02:00
objxref.pl Make objxref.pl output in correct format 2015-02-04 03:50:09 +00:00