mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
a552c23c65
In the event that a config file contains this sequence: ======= openssl_conf = openssl_init config_diagnostics = 1 [openssl_init] oid_section = oids [oids] testoid1 = 1.2.3.4.1 testoid2 = A Very Long OID Name, 1.2.3.4.2 testoid3 = ,1.2.3.4.3 ====== The leading comma in testoid3 can cause a heap buffer overflow, as the parsing code will move the string pointer back 1 character, thereby pointing to an invalid memory space correct the parser to detect this condition and handle it by treating it as if the comma doesn't exist (i.e. an empty long oid name) Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22957)
13 lines
240 B
INI
13 lines
240 B
INI
openssl_conf = openssl_init
|
|
|
|
# Comment out the next line to ignore configuration errors
|
|
config_diagnostics = 1
|
|
|
|
[openssl_init]
|
|
oid_section = oids
|
|
|
|
[oids]
|
|
testoid1 = 1.2.3.4.1
|
|
testoid2 = A Very Long OID Name, 1.2.3.4.2
|
|
testoid3 = ,1.2.3.4.3
|