]> git.ipfire.org Git - thirdparty/openssl.git/commit
ssl: guard ciphersuite_cb() against NULL elem from CONF_parse_list
authormat <mateiignat03@gmail.com>
Wed, 29 Apr 2026 06:08:44 +0000 (09:08 +0300)
committerTomas Mraz <tomas@openssl.foundation>
Tue, 26 May 2026 08:56:32 +0000 (10:56 +0200)
commitdbf949c4b2f403d4b212e045adfe0686755bb229
treed266ca9978dcb4c9159517cd5fe18adf4ceaa4de
parente5029e3ed259c34d5cbb3e309c7bd2d31be8f16b
ssl: guard ciphersuite_cb() against NULL elem from CONF_parse_list

CONF_parse_list() invokes its callback with elem=NULL and len=0 for
empty list elements (e.g. consecutive separators like "A::B").
ciphersuite_cb() passed elem directly to memcpy() without checking for
NULL, triggering undefined behaviour on any input containing an empty
ciphersuite token.

Skip empty elements early by returning 1 before any pointer dereference.

Fixes #30919

Reviewed-by: Daniel Kubec <kubec@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue May 26 08:56:52 2026
(Merged from https://github.com/openssl/openssl/pull/31023)
ssl/ssl_ciph.c