Fix out-of-memory condition in conf
authorMatt Caswell <matt@openssl.org>
Fri, 10 Mar 2017 10:51:35 +0000 (10:51 +0000)
committerMatt Caswell <matt@openssl.org>
Sun, 12 Mar 2017 00:31:39 +0000 (00:31 +0000)
commit6a6213556a80ab0a9eb926a1d6023b8bf44f2afd
treece34855c49457f422fa49bab40cc98b5fd5e2df4
parent6fe43af8d77b119f8af913c284149bca482ee58c
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)
(cherry picked from commit 8a585601fea1091022034dd14b961c1ecd5916c3)
crypto/conf/conf.h
crypto/conf/conf_def.c
crypto/conf/conf_err.c
doc/apps/config.pod