openssl/crypto/conf
Neil Horman 682fd21afb Detect and prevent recursive config parsing
If a malformed config file is provided such as the following:

openssl_conf = openssl_init
[openssl_init]
providers = provider_sect
[provider_sect]
 = provider_sect

The config parsing library will crash overflowing the stack, as it
recursively parses the same provider_sect ad nauseum.

Prevent this by maintaing a list of visited nodes as we recurse through
referenced sections, and erroring out in the event we visit any given
section node more than once.

Note, adding the test for this revealed that our diagnostic code
inadvertently pops recorded errors off the error stack because
provider_conf_load returns success even in the event that a
configuration parse failed. The call path to provider_conf_load has been
updated in this commit to address that shortcoming, allowing recorded
errors to be visibile to calling applications.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22898)
2023-12-21 13:38:31 -05:00
..
build.info Move the loading of the ssl_conf module to libcrypto 2018-04-05 15:30:12 +01:00
conf_api.c Update copyright year 2022-05-03 13:34:51 +01:00
conf_def.c "foo * bar" should be "foo *bar" 2023-09-11 10:15:30 +02:00
conf_def.h Fix copyright year issues 2022-01-06 09:27:02 +01:00
conf_err.c Detect and prevent recursive config parsing 2023-12-21 13:38:31 -05:00
conf_lib.c Add notes on use of strdup 2023-10-24 17:30:58 +01:00
conf_local.h Make conf_method_st and conf_st deprecated 2021-06-02 12:40:02 +10:00
conf_mall.c Update copyright year 2021-04-08 13:04:41 +01:00
conf_mod.c Copyright year updates 2023-09-07 09:59:15 +01:00
conf_sap.c Copyright year updates 2023-09-07 09:59:15 +01:00
conf_ssl.c Update copyright year 2021-04-08 13:04:41 +01:00
keysets.pl Add a local perl module to get year last changed 2021-03-31 13:59:53 +02:00